]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - include/linux/ipv6.h
Merge tag 'nfc-next-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
[mirror_ubuntu-hirsute-kernel.git] / include / linux / ipv6.h
index 7edc14fb66b6870298b7927e0727931d72342c1b..5c91b0b055d4974d4316e5c8c01580ea7abe734e 100644 (file)
@@ -63,7 +63,8 @@ struct ipv6_devconf {
        } stable_secret;
        __s32           use_oif_addrs_only;
        __s32           keep_addr_on_down;
-       void            *sysctl;
+
+       struct ctl_table_header *sysctl_header;
 };
 
 struct ipv6_params {
@@ -117,14 +118,29 @@ struct inet6_skb_parm {
 #define IP6SKB_ROUTERALERT     8
 #define IP6SKB_FRAGMENTED      16
 #define IP6SKB_HOPBYHOP        32
+#define IP6SKB_L3SLAVE         64
 };
 
+#if defined(CONFIG_NET_L3_MASTER_DEV)
+static inline bool skb_l3mdev_slave(__u16 flags)
+{
+       return flags & IP6SKB_L3SLAVE;
+}
+#else
+static inline bool skb_l3mdev_slave(__u16 flags)
+{
+       return false;
+}
+#endif
+
 #define IP6CB(skb)     ((struct inet6_skb_parm*)((skb)->cb))
 #define IP6CBMTU(skb)  ((struct ip6_mtuinfo *)((skb)->cb))
 
 static inline int inet6_iif(const struct sk_buff *skb)
 {
-       return IP6CB(skb)->iif;
+       bool l3_slave = skb_l3mdev_slave(IP6CB(skb)->flags);
+
+       return l3_slave ? skb->skb_iif : IP6CB(skb)->iif;
 }
 
 struct tcp6_request_sock {