mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
inet_hashtables: Add inet_lookup_skb helpers
To be able to use the cached socket reference in the skb during input processing we add a new set of lookup functions that receive the skb on their argument list. Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: KOVACS Krisztian <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
c7004482e8
commit
9a1f27c480
6 changed files with 31 additions and 14 deletions
|
|
@ -811,9 +811,8 @@ static int dccp_v4_rcv(struct sk_buff *skb)
|
|||
|
||||
/* Step 2:
|
||||
* Look up flow ID in table and get corresponding socket */
|
||||
sk = __inet_lookup(dev_net(skb->dst->dev), &dccp_hashinfo,
|
||||
iph->saddr, dh->dccph_sport,
|
||||
iph->daddr, dh->dccph_dport, inet_iif(skb));
|
||||
sk = __inet_lookup_skb(&dccp_hashinfo, skb,
|
||||
dh->dccph_sport, dh->dccph_dport);
|
||||
/*
|
||||
* Step 2:
|
||||
* If no socket ...
|
||||
|
|
|
|||
|
|
@ -805,10 +805,8 @@ static int dccp_v6_rcv(struct sk_buff *skb)
|
|||
|
||||
/* Step 2:
|
||||
* Look up flow ID in table and get corresponding socket */
|
||||
sk = __inet6_lookup(dev_net(skb->dst->dev), &dccp_hashinfo,
|
||||
&ipv6_hdr(skb)->saddr, dh->dccph_sport,
|
||||
&ipv6_hdr(skb)->daddr, ntohs(dh->dccph_dport),
|
||||
inet6_iif(skb));
|
||||
sk = __inet6_lookup_skb(&dccp_hashinfo, skb,
|
||||
dh->dccph_sport, dh->dccph_dport);
|
||||
/*
|
||||
* Step 2:
|
||||
* If no socket ...
|
||||
|
|
|
|||
Loading…
Reference in a new issue