aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index d9416b5162bc..85164d4d3e53 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1503,23 +1503,23 @@ csum_err:
1503} 1503}
1504EXPORT_SYMBOL(tcp_v4_do_rcv); 1504EXPORT_SYMBOL(tcp_v4_do_rcv);
1505 1505
1506void tcp_v4_early_demux(struct sk_buff *skb) 1506int tcp_v4_early_demux(struct sk_buff *skb)
1507{ 1507{
1508 const struct iphdr *iph; 1508 const struct iphdr *iph;
1509 const struct tcphdr *th; 1509 const struct tcphdr *th;
1510 struct sock *sk; 1510 struct sock *sk;
1511 1511
1512 if (skb->pkt_type != PACKET_HOST) 1512 if (skb->pkt_type != PACKET_HOST)
1513 return; 1513 return 0;
1514 1514
1515 if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) 1515 if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr)))
1516 return; 1516 return 0;
1517 1517
1518 iph = ip_hdr(skb); 1518 iph = ip_hdr(skb);
1519 th = tcp_hdr(skb); 1519 th = tcp_hdr(skb);
1520 1520
1521 if (th->doff < sizeof(struct tcphdr) / 4) 1521 if (th->doff < sizeof(struct tcphdr) / 4)
1522 return; 1522 return 0;
1523 1523
1524 sk = __inet_lookup_established(dev_net(skb->dev), &tcp_hashinfo, 1524 sk = __inet_lookup_established(dev_net(skb->dev), &tcp_hashinfo,
1525 iph->saddr, th->source, 1525 iph->saddr, th->source,
@@ -1538,6 +1538,7 @@ void tcp_v4_early_demux(struct sk_buff *skb)
1538 skb_dst_set_noref(skb, dst); 1538 skb_dst_set_noref(skb, dst);
1539 } 1539 }
1540 } 1540 }
1541 return 0;
1541} 1542}
1542 1543
1543bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb) 1544bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb)