fix off-by-14 error in fragmentation
This was harmless since it simply meant our fragments were not as long as they could be.
This commit is contained in:
1 parent
0059f0cb49
commit
753af453ef
1 file changed
+1
-1
+1
-1
@@ -129,7 +129,7 @@ func fragment(eth layers.Ethernet, ip layers.IPv4, pmtu int, frame *ForwardedFra
|
||||
headerSize := int(ip.IHL) * 4
|
||||
// &^ is bit clear (AND NOT). So here we're clearing the lowest 3
|
||||
// bits.
|
||||
maxSegmentSize := (pmtu - EthernetOverhead - headerSize) &^ 7
|
||||
maxSegmentSize := (pmtu - headerSize) &^ 7
|
||||
opts := gopacket.SerializeOptions{
|
||||
FixLengths: false,
|
||||
ComputeChecksums: true}
|
||||
|
||||
Reference in new issue
Block a user