Skip to content

Commit 3e84b86

Browse files
committed
[tunnel/connection] AI does not know RFC 791
1 parent f8414cb commit 3e84b86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/tunnel/connection/muxed_conn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func (m *MuxedConn) WritePacket(pkt []byte) ([]byte, error) {
145145
// IPv4 packet (RFC 791)
146146
if len(pkt) >= 20 {
147147
var addr [4]byte
148-
copy(addr[:], pkt[12:16])
148+
copy(addr[:], pkt[16:20])
149149
dstIP = netip.AddrFrom4(addr)
150150
} else {
151151
return nil, fmt.Errorf("IPv4 packet too short: %d", len(pkt))

0 commit comments

Comments
 (0)