Re: [PATCH] xt_TCPMSS: SYN packets are allowed to contain data

From: Patrick McHardy
Date: Tue Jan 19 2010 - 04:30:38 EST


William Allen Simpson wrote:
> Simon Arlott wrote:
>> The check for data only needs to apply where the packet length
>> could be increased by adding the MSS option. (The MSS option
>> itself applies to the sender's maximum receive size which is
>> not relevant to any data in its own packet.)
>>
>> This moves the check for (header size != packet size) to after
>> attempting to modify an existing MSS option. Another check is
>> needed before looking through the header to ensure it doesn't
>> claim to be larger than the packet size.
>>
> What's the path from tcp_v[4,6]_rcv() to these tests?
>
> 1) Header larger than the packet is already tested in about 5 places,
> and my patch "tcp: harmonize tcp_vx_rcv header length assumptions"
> tries to get them all down to just *one* test.

We're talking about a netfilter module here, which has to deal
with forwarded traffic and can only rely on the IP header checks
done in ip_rcv().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/