Re: fragmented packet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> MTU=4 does not even make for a proper IPv4 packet, for which
> the minimum reasonable MTU would be the IPv4 header size.
the minimum size of ipv4 header is 20 bytes, the ethernet protocol use
mtu=16byte, so the sentence below is not valid (imho)...i can build a
layer2 protocol where the mtu is 4 bytes: IP protocol must be able to
work above my layer2

>>sk_buff len: 24
>>!!!fragmented!!!
>>frag off: 0
>>
>>sk_buff len: 24
>>!!!fragmented!!!
>>frag off: 0
>
> This might be the reply.
no, it is impossibile because i've no response with that line of hping
(i send only one packet, zero receive): infact the output is:
--- localhost hping statistic ---
1 packets tramitted, 0 packets received, 100% packet loss
(0 received --- READ THE WHY BELOW )



> Input only, and empty fragment. You ought to check the packet size
the packet size is 40 bytes....


BELOW:
but...maybe i've found the "solution"...but i've to test it yet.
So: i've a 40 bytes packet, and a MTU of 4 byte. the payload size is
20 byte (because hping use the smaller ipheader: 20bytes). At this
point the fragment's number is -inevitably- 20/4 = 5. But, how can i
calculate the fragment offset?
In this way: the first packet has fragoff = 0, the second packet has
fragoff = size of the first fragment / 8 = 0!!! (rounded down), the
third packet has fragoff = (size of the first fragment+size of the
second fragment) / 8 = 1...
That's why i have no packet received, because i can't defragmented a
packet with some frags that have the same fragoff!
So in this way we have explained:
1. why i haven't receive a response packet
2. why i have the same fragoff

it's all ok, now.

what do you think Jan?

-- 
Nicola Padovano
e-mail: nicola.padovano@xxxxxxxxx
web: http://npadovano.altervista.org
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux