summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-06-27 22:01:22 -0700
committerDavid S. Miller <davem@davemloft.net>2012-06-27 22:01:22 -0700
commit160eb5a6b14ca2eab5c598bdbbb24c24624bad34 (patch)
treeccdc41681ef1e8cd634084c5160890cc975961a0 /net/ipv4/tcp_ipv4.c
parent1d1e34ddd48d27def2f324c1e3be16d460b16436 (diff)
ipv4: Kill early demux method return value.
It's completely unnecessary. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 1781dc650b9..b4ae1c199f3 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1673,30 +1673,28 @@ csum_err:
}
EXPORT_SYMBOL(tcp_v4_do_rcv);
-int tcp_v4_early_demux(struct sk_buff *skb)
+void 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;
- err = -ENOENT;
if (skb->pkt_type != PACKET_HOST)
- goto out_err;
+ return;
if (!pskb_may_pull(skb, ip_hdrlen(skb) + sizeof(struct tcphdr)))
- goto out_err;
+ return;
iph = ip_hdr(skb);
th = (struct tcphdr *) ((char *)iph + ip_hdrlen(skb));
if (th->doff < sizeof(struct tcphdr) / 4)
- goto out_err;
+ return;
if (!pskb_may_pull(skb, ip_hdrlen(skb) + th->doff * 4))
- goto out_err;
+ return;
dev = skb->dev;
sk = __inet_lookup_established(net, &tcp_hashinfo,
@@ -1713,16 +1711,11 @@ int tcp_v4_early_demux(struct sk_buff *skb)
if (dst) {
struct rtable *rt = (struct rtable *) dst;
- if (rt->rt_iif == dev->ifindex) {
+ if (rt->rt_iif == dev->ifindex)
skb_dst_set_noref(skb, dst);
- err = 0;
- }
}
}
}
-
-out_err:
- return err;
}
/*