Loading include/net/tcp.h +1 −0 Original line number Diff line number Diff line Loading @@ -1085,6 +1085,7 @@ static inline void tcp_prequeue_init(struct tcp_sock *tp) } bool tcp_prequeue(struct sock *sk, struct sk_buff *skb); int tcp_filter(struct sock *sk, struct sk_buff *skb); #undef STATE_TRACE Loading net/ipv4/tcp_ipv4.c +18 −1 Original line number Diff line number Diff line Loading @@ -1581,6 +1581,21 @@ bool tcp_prequeue(struct sock *sk, struct sk_buff *skb) } EXPORT_SYMBOL(tcp_prequeue); int tcp_filter(struct sock *sk, struct sk_buff *skb) { struct tcphdr *th = (struct tcphdr *)skb->data; unsigned int eaten = skb->len; int err; err = sk_filter_trim_cap(sk, skb, th->doff * 4); if (!err) { eaten -= skb->len; TCP_SKB_CB(skb)->end_seq -= eaten; } return err; } EXPORT_SYMBOL(tcp_filter); /* * From tcp_input.c */ Loading Loading @@ -1664,8 +1679,10 @@ process: nf_reset(skb); if (sk_filter(sk, skb)) if (tcp_filter(sk, skb)) goto discard_and_relse; th = (const struct tcphdr *)skb->data; iph = ip_hdr(skb); sk_mark_napi_id(sk, skb); skb->dev = NULL; Loading net/ipv6/tcp_ipv6.c +4 −2 Original line number Diff line number Diff line Loading @@ -1256,7 +1256,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) if (skb->protocol == htons(ETH_P_IP)) return tcp_v4_do_rcv(sk, skb); if (sk_filter(sk, skb)) if (tcp_filter(sk, skb)) goto discard; /* Loading Loading @@ -1460,8 +1460,10 @@ process: goto discard_and_relse; #endif if (sk_filter(sk, skb)) if (tcp_filter(sk, skb)) goto discard_and_relse; th = (const struct tcphdr *)skb->data; hdr = ipv6_hdr(skb); sk_mark_napi_id(sk, skb); skb->dev = NULL; Loading Loading
include/net/tcp.h +1 −0 Original line number Diff line number Diff line Loading @@ -1085,6 +1085,7 @@ static inline void tcp_prequeue_init(struct tcp_sock *tp) } bool tcp_prequeue(struct sock *sk, struct sk_buff *skb); int tcp_filter(struct sock *sk, struct sk_buff *skb); #undef STATE_TRACE Loading
net/ipv4/tcp_ipv4.c +18 −1 Original line number Diff line number Diff line Loading @@ -1581,6 +1581,21 @@ bool tcp_prequeue(struct sock *sk, struct sk_buff *skb) } EXPORT_SYMBOL(tcp_prequeue); int tcp_filter(struct sock *sk, struct sk_buff *skb) { struct tcphdr *th = (struct tcphdr *)skb->data; unsigned int eaten = skb->len; int err; err = sk_filter_trim_cap(sk, skb, th->doff * 4); if (!err) { eaten -= skb->len; TCP_SKB_CB(skb)->end_seq -= eaten; } return err; } EXPORT_SYMBOL(tcp_filter); /* * From tcp_input.c */ Loading Loading @@ -1664,8 +1679,10 @@ process: nf_reset(skb); if (sk_filter(sk, skb)) if (tcp_filter(sk, skb)) goto discard_and_relse; th = (const struct tcphdr *)skb->data; iph = ip_hdr(skb); sk_mark_napi_id(sk, skb); skb->dev = NULL; Loading
net/ipv6/tcp_ipv6.c +4 −2 Original line number Diff line number Diff line Loading @@ -1256,7 +1256,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) if (skb->protocol == htons(ETH_P_IP)) return tcp_v4_do_rcv(sk, skb); if (sk_filter(sk, skb)) if (tcp_filter(sk, skb)) goto discard; /* Loading Loading @@ -1460,8 +1460,10 @@ process: goto discard_and_relse; #endif if (sk_filter(sk, skb)) if (tcp_filter(sk, skb)) goto discard_and_relse; th = (const struct tcphdr *)skb->data; hdr = ipv6_hdr(skb); sk_mark_napi_id(sk, skb); skb->dev = NULL; Loading