patch-2.1.77 linux/net/ipv4/tcp_ipv4.c

Next file: linux/scripts/Menuconfig
Previous file: linux/net/ipv4/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.76/linux/net/ipv4/tcp_ipv4.c linux/net/ipv4/tcp_ipv4.c
@@ -1467,6 +1467,14 @@
 
 int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
 {
+#ifdef CONFIG_FILTER
+	if (sk->filter)
+	{
+		if (sk_filter(skb, sk->filter_data, sk->filter))
+			return -EPERM;	/* Toss packet */
+	}
+#endif /* CONFIG_FILTER */
+
 	skb_set_owner_r(skb, sk);
 
 	/*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov