patch-2.4.6 linux/net/ipv4/raw.c
Next file: linux/net/ipv4/tcp_input.c
Previous file: linux/net/ipv4/netfilter/ipt_unclean.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Thu Jun 14 14:16:58 2001
- Orig file:
v2.4.5/linux/net/ipv4/raw.c
- Orig date:
Wed May 16 10:31:27 2001
diff -u --recursive --new-file v2.4.5/linux/net/ipv4/raw.c linux/net/ipv4/raw.c
@@ -5,7 +5,7 @@
*
* RAW - implementation of IP "raw" sockets.
*
- * Version: $Id: raw.c,v 1.61 2001/05/03 20:56:04 davem Exp $
+ * Version: $Id: raw.c,v 1.62 2001/06/05 10:52:15 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -121,8 +121,11 @@
int type;
type = skb->h.icmph->type;
- if (type < 32)
- return test_bit(type, &sk->tp_pinfo.tp_raw4.filter);
+ if (type < 32) {
+ __u32 data = sk->tp_pinfo.tp_raw4.filter.data;
+
+ return ((1 << type) & data) != 0;
+ }
/* Do not block unknown ICMP types */
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)