]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netfilter/xt_dccp.c
[NETFILTER]: {ip, nf}_conntrack_sctp: fix remotely triggerable NULL ptr dereference...
[linux-2.6-omap-h63xx.git] / net / netfilter / xt_dccp.c
index 1b77c5bcb348c3180c844513d6d8120a2e5dea57..83224ec89cc08348205daaf58a7104ea79773e53 100644 (file)
@@ -81,7 +81,7 @@ dccp_find_option(u_int8_t option,
 static inline bool
 match_types(const struct dccp_hdr *dh, u_int16_t typemask)
 {
-       return (typemask & (1 << dh->dccph_type));
+       return typemask & (1 << dh->dccph_type);
 }
 
 static inline bool
@@ -113,11 +113,11 @@ match(const struct sk_buff *skb,
                return false;
        }
 
-       return  DCCHECK(((ntohs(dh->dccph_sport) >= info->spts[0])
-                       && (ntohs(dh->dccph_sport) <= info->spts[1])),
+       return  DCCHECK(ntohs(dh->dccph_sport) >= info->spts[0]
+                       && ntohs(dh->dccph_sport) <= info->spts[1],
                        XT_DCCP_SRC_PORTS, info->flags, info->invflags)
-               && DCCHECK(((ntohs(dh->dccph_dport) >= info->dpts[0])
-                       && (ntohs(dh->dccph_dport) <= info->dpts[1])),
+               && DCCHECK(ntohs(dh->dccph_dport) >= info->dpts[0]
+                       && ntohs(dh->dccph_dport) <= info->dpts[1],
                        XT_DCCP_DEST_PORTS, info->flags, info->invflags)
                && DCCHECK(match_types(dh, info->typemask),
                           XT_DCCP_TYPE, info->flags, info->invflags)
@@ -140,7 +140,7 @@ checkentry(const char *tablename,
                && !(info->invflags & ~info->flags);
 }
 
-static struct xt_match xt_dccp_match[] = {
+static struct xt_match xt_dccp_match[] __read_mostly = {
        {
                .name           = "dccp",
                .family         = AF_INET,