From: Bart De Schuymer Date: Tue, 10 Jan 2006 21:12:22 +0000 (-0800) Subject: [EBTABLES] Don't match tcp/udp source/destination port for IP fragments X-Git-Tag: v2.6.16-rc1~446^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a4c8a96a47c9e2f08156fd9664974df086eed50;p=linux-2.6 [EBTABLES] Don't match tcp/udp source/destination port for IP fragments Signed-off-by: Bart De Schuymer Signed-off-by: David S. Miller --- diff --git a/net/bridge/netfilter/ebt_ip.c b/net/bridge/netfilter/ebt_ip.c index 7323805b97..f158fe67dd 100644 --- a/net/bridge/netfilter/ebt_ip.c +++ b/net/bridge/netfilter/ebt_ip.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -51,6 +52,8 @@ static int ebt_filter_ip(const struct sk_buff *skb, const struct net_device *in, if (!(info->bitmask & EBT_IP_DPORT) && !(info->bitmask & EBT_IP_SPORT)) return EBT_MATCH; + if (ntohs(ih->frag_off) & IP_OFFSET) + return EBT_NOMATCH; pptr = skb_header_pointer(skb, ih->ihl*4, sizeof(_ports), &_ports); if (pptr == NULL)