patch-2.4.6 linux/net/ipv6/raw.c
Next file: linux/net/ipv6/tcp_ipv6.c
Previous file: linux/net/ipv6/ip6_fib.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Thu Jun 14 14:16:58 2001
- Orig file:
v2.4.5/linux/net/ipv6/raw.c
- Orig date:
Thu Apr 12 12:11:39 2001
diff -u --recursive --new-file v2.4.5/linux/net/ipv6/raw.c linux/net/ipv6/raw.c
@@ -7,7 +7,7 @@
*
* Adapted from linux/net/ipv4/raw.c
*
- * $Id: raw.c,v 1.45 2001/02/18 09:10:42 davem Exp $
+ * $Id: raw.c,v 1.46 2001/06/05 11:36:55 davem Exp $
*
* Fixes:
* Hideaki YOSHIFUJI : sin6_scope_id support
@@ -117,8 +117,13 @@
opt = &sk->tp_pinfo.tp_raw;
if (pskb_may_pull(skb, sizeof(struct icmp6hdr))) {
+ __u32 *data = &opt->filter.data[0];
+ int bit_nr;
+
icmph = (struct icmp6hdr *) skb->data;
- return test_bit(icmph->icmp6_type, &opt->filter);
+ bit_nr = icmph->icmp6_type;
+
+ return (data[bit_nr >> 5] & (1 << (bit_nr & 31))) != 0;
}
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)