mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
inet: refactor inet[6]_lookup functions to take skb
This is a preliminary step to allow fast socket lookup of SO_REUSEPORT groups. Doing so with a BPF filter will require access to the skb in question. This change plumbs the skb (and offset to payload data) through the call stack to the listening socket lookup implementations where it will be used in a following patch. Signed-off-by: Craig Gallek <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
d9b3fca273
commit
a583636a83
12 changed files with 85 additions and 42 deletions
|
|
@ -802,7 +802,7 @@ static int dccp_v4_rcv(struct sk_buff *skb)
|
|||
}
|
||||
|
||||
lookup:
|
||||
sk = __inet_lookup_skb(&dccp_hashinfo, skb,
|
||||
sk = __inet_lookup_skb(&dccp_hashinfo, skb, __dccp_hdr_len(dh),
|
||||
dh->dccph_sport, dh->dccph_dport);
|
||||
if (!sk) {
|
||||
dccp_pr_debug("failed to look up flow ID in table and "
|
||||
|
|
|
|||
|
|
@ -668,7 +668,7 @@ static int dccp_v6_rcv(struct sk_buff *skb)
|
|||
DCCP_SKB_CB(skb)->dccpd_ack_seq = dccp_hdr_ack_seq(skb);
|
||||
|
||||
lookup:
|
||||
sk = __inet6_lookup_skb(&dccp_hashinfo, skb,
|
||||
sk = __inet6_lookup_skb(&dccp_hashinfo, skb, __dccp_hdr_len(dh),
|
||||
dh->dccph_sport, dh->dccph_dport,
|
||||
inet6_iif(skb));
|
||||
if (!sk) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue