tcp: early_demux fixes
1) Remove a non needed pskb_may_pull() in tcp_v4_early_demux() and fix a potential bug if skb->head was reallocated (iph & th pointers were not reloaded) TCP stack will pull/check headers anyway. 2) must reload iph in ip_rcv_finish() after early_demux() call since skb->head might have changed. 3) skb->dev->ifindex can be now replaced by skb->skb_iif Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c20cd5d753
commit
9cb429d692
@@ -326,8 +326,11 @@ static int ip_rcv_finish(struct sk_buff *skb)
|
||||
|
||||
rcu_read_lock();
|
||||
ipprot = rcu_dereference(inet_protos[protocol]);
|
||||
if (ipprot && ipprot->early_demux)
|
||||
if (ipprot && ipprot->early_demux) {
|
||||
ipprot->early_demux(skb);
|
||||
/* must reload iph, skb->head might have changed */
|
||||
iph = ip_hdr(skb);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user