Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314557
b: refs/heads/master
c: fd62e09
h: refs/heads/master
i:
  314555: 576a070
v: v3
  • Loading branch information
David S. Miller committed Jun 21, 2012
1 parent b833cf4 commit ed9e9ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3e428fe0382fca48795b5cf9d4f03a89cda5d84d
refs/heads/master: fd62e09b946522ec3578412826a81bead06fadf7
12 changes: 9 additions & 3 deletions trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1676,6 +1676,7 @@ int tcp_v4_early_demux(struct sk_buff *skb)
struct net *net = dev_net(skb->dev);
const struct iphdr *iph;
const struct tcphdr *th;
struct net_device *dev;
struct sock *sk;
int err;

Expand All @@ -1695,10 +1696,11 @@ int tcp_v4_early_demux(struct sk_buff *skb)
if (!pskb_may_pull(skb, ip_hdrlen(skb) + th->doff * 4))
goto out_err;

dev = skb->dev;
sk = __inet_lookup_established(net, &tcp_hashinfo,
iph->saddr, th->source,
iph->daddr, th->dest,
skb->dev->ifindex);
dev->ifindex);
if (sk) {
skb->sk = sk;
skb->destructor = sock_edemux;
Expand All @@ -1707,8 +1709,12 @@ int tcp_v4_early_demux(struct sk_buff *skb)
if (dst)
dst = dst_check(dst, 0);
if (dst) {
skb_dst_set_noref(skb, dst);
err = 0;
struct rtable *rt = (struct rtable *) dst;

if (rt->rt_iif == dev->ifindex) {
skb_dst_set_noref(skb, dst);
err = 0;
}
}
}
}
Expand Down

0 comments on commit ed9e9ff

Please sign in to comment.