[PATCH]: fixed kernel panic when trying to find tcp option
Yasuyuki Kozakai
yasuyuki.kozakai at toshiba.co.jp
Wed Sep 15 13:36:44 CEST 2004
Hi,
This patch fixed panic on 2.6.9-rc2 when trying to find tcp option
in the packet which has no option.
If not fixed yet, please apply this patch.
Regards,
-----------------------------------------------------------------
Yasuyuki KOZAKAI @ USAGI Project <yasuyuki.kozakai at toshiba.co.jp>
-------------- next part --------------
--- linux-2.6.9-rc2/net/ipv4/netfilter/ip_tables.c 2004-09-15 14:04:16.000000000 +0900
+++ linux-2.6.9-rc2-nolinearize/net/ipv4/netfilter/ip_tables.c 2004-09-15 20:01:42.970226904 +0900
@@ -1464,8 +1464,9 @@ tcp_find_option(u_int8_t option,
unsigned int i;
duprintf("tcp_match: finding option\n");
+ if (!optlen)
+ return invert;
/* If we don't have the whole header, drop packet. */
- BUG_ON(!optlen);
op = skb_header_pointer(skb,
skb->nh.iph->ihl*4 + sizeof(struct tcphdr),
optlen, _opt);
More information about the netfilter-devel
mailing list