inet: Sanitize inet{,6} protocol demux.
[deliverable/linux.git] / net / ipv6 / raw.c
index 43b0042f15f4aae7536faf4eb52064a1c785c291..b5c1dcb277370f09039ba4fd34dc596644b6114e 100644 (file)
@@ -165,7 +165,7 @@ static bool ipv6_raw_deliver(struct sk_buff *skb, int nexthdr)
        saddr = &ipv6_hdr(skb)->saddr;
        daddr = saddr + 1;
 
-       hash = nexthdr & (MAX_INET_PROTOS - 1);
+       hash = nexthdr & (RAW_HTABLE_SIZE - 1);
 
        read_lock(&raw_v6_hashinfo.lock);
        sk = sk_head(&raw_v6_hashinfo.ht[hash]);
@@ -229,7 +229,7 @@ bool raw6_local_deliver(struct sk_buff *skb, int nexthdr)
 {
        struct sock *raw_sk;
 
-       raw_sk = sk_head(&raw_v6_hashinfo.ht[nexthdr & (MAX_INET_PROTOS - 1)]);
+       raw_sk = sk_head(&raw_v6_hashinfo.ht[nexthdr & (RAW_HTABLE_SIZE - 1)]);
        if (raw_sk && !ipv6_raw_deliver(skb, nexthdr))
                raw_sk = NULL;
 
This page took 0.032833 seconds and 5 git commands to generate.