patch-2.1.79 linux/net/ipv4/tcp_ipv4.c
Next file: linux/net/ipv4/tcp_timer.c
Previous file: linux/net/ipv4/tcp_input.c
Back to the patch index
Back to the overall index
- Lines: 62
- Date:
Mon Jan 12 15:28:28 1998
- Orig file:
v2.1.78/linux/net/ipv4/tcp_ipv4.c
- Orig date:
Fri Jan 2 14:37:03 1998
diff -u --recursive --new-file v2.1.78/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.76 1997/12/07 04:44:19 freitag Exp $
+ * Version: $Id: tcp_ipv4.c,v 1.77 1997/12/13 21:53:00 kuznet Exp $
*
* IPv4 specific functions
*
@@ -48,7 +48,6 @@
#include <linux/fcntl.h>
#include <linux/random.h>
#include <linux/ipsec.h>
-#include <linux/inet.h>
#include <net/icmp.h>
#include <net/tcp.h>
@@ -56,6 +55,8 @@
#include <asm/segment.h>
+#include <linux/inet.h>
+
extern int sysctl_tcp_sack;
extern int sysctl_tcp_tsack;
extern int sysctl_tcp_timestamps;
@@ -1467,14 +1468,6 @@
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);
/*
@@ -1610,6 +1603,10 @@
rt = (struct rtable*)skb->dst;
/* Force route checking if want_rewrite */
+ /* The idea is good, the implementation is disguisting.
+ Well, if I made bind on this socket, you cannot randomly ovewrite
+ its source address. --ANK
+ */
if (want_rewrite) {
int tmp;
__u32 old_saddr = rt->rt_src;
@@ -1639,9 +1636,6 @@
dst_release(skb->dst);
skb->dst = &rt->u.dst;
}
-
- /* Discard the surplus MAC header. */
- skb_pull(skb, skb->nh.raw-skb->data);
iph = skb->nh.iph;
th = skb->h.th;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov