diff options
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index f83b7f220a65..5b82d4d94834 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -794,12 +794,23 @@ struct tcp_skb_cb { | |||
794 | */ | 794 | */ |
795 | static inline int tcp_v6_iif(const struct sk_buff *skb) | 795 | static inline int tcp_v6_iif(const struct sk_buff *skb) |
796 | { | 796 | { |
797 | bool l3_slave = skb_l3mdev_slave(TCP_SKB_CB(skb)->header.h6.flags); | 797 | bool l3_slave = ipv6_l3mdev_skb(TCP_SKB_CB(skb)->header.h6.flags); |
798 | 798 | ||
799 | return l3_slave ? skb->skb_iif : TCP_SKB_CB(skb)->header.h6.iif; | 799 | return l3_slave ? skb->skb_iif : TCP_SKB_CB(skb)->header.h6.iif; |
800 | } | 800 | } |
801 | #endif | 801 | #endif |
802 | 802 | ||
803 | /* TCP_SKB_CB reference means this can not be used from early demux */ | ||
804 | static inline bool inet_exact_dif_match(struct net *net, struct sk_buff *skb) | ||
805 | { | ||
806 | #if IS_ENABLED(CONFIG_NET_L3_MASTER_DEV) | ||
807 | if (!net->ipv4.sysctl_tcp_l3mdev_accept && | ||
808 | ipv4_l3mdev_skb(TCP_SKB_CB(skb)->header.h4.flags)) | ||
809 | return true; | ||
810 | #endif | ||
811 | return false; | ||
812 | } | ||
813 | |||
803 | /* Due to TSO, an SKB can be composed of multiple actual | 814 | /* Due to TSO, an SKB can be composed of multiple actual |
804 | * packets. To keep these tracked properly, we use this. | 815 | * packets. To keep these tracked properly, we use this. |
805 | */ | 816 | */ |