patch-2.2.5 linux/net/ipv4/tcp_ipv4.c
Next file: linux/net/ipv6/addrconf.c
Previous file: linux/net/ipv4/route.c
Back to the patch index
Back to the overall index
- Lines: 42
- Date:
Sun Mar 28 09:07:47 1999
- Orig file:
v2.2.4/linux/net/ipv4/tcp_ipv4.c
- Orig date:
Tue Mar 23 14:35:48 1999
diff -u --recursive --new-file v2.2.4/linux/net/ipv4/tcp_ipv4.c linux/net/ipv4/tcp_ipv4.c
@@ -5,7 +5,7 @@
*
* Implementation of the Transmission Control Protocol(TCP).
*
- * Version: $Id: tcp_ipv4.c,v 1.170 1999/03/21 05:22:47 davem Exp $
+ * Version: $Id: tcp_ipv4.c,v 1.171 1999/03/28 10:18:26 davem Exp $
*
* IPv4 specific functions
*
@@ -1305,6 +1305,9 @@
if(newsk != NULL) {
struct tcp_opt *newtp;
+#ifdef CONFIG_FILTER
+ struct sk_filter *filter;
+#endif
memcpy(newsk, sk, sizeof(*newsk));
newsk->sklist_next = NULL;
@@ -1326,8 +1329,8 @@
skb_queue_head_init(&newsk->back_log);
skb_queue_head_init(&newsk->error_queue);
#ifdef CONFIG_FILTER
- if (newsk->filter)
- sk_filter_charge(newsk, newsk->filter);
+ if ((filter = newsk->filter) != NULL)
+ sk_filter_charge(newsk, filter);
#endif
/* Now setup tcp_opt */
@@ -1559,9 +1562,9 @@
int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
{
-
#ifdef CONFIG_FILTER
- if (sk->filter && sk_filter(skb, sk->filter))
+ struct sk_filter *filter = sk->filter;
+ if (filter && sk_filter(skb, filter))
goto discard;
#endif /* CONFIG_FILTER */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)