]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/ipv6.h
Merge tag 'sound-fix-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[karo-tx-linux.git] / include / linux / ipv6.h
index 7edc14fb66b6870298b7927e0727931d72342c1b..c6dbcd84a2c71ce43c9821e833ca800b5781f7ff 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 {
@@ -267,6 +283,8 @@ struct tcp6_timewait_sock {
 };
 
 #if IS_ENABLED(CONFIG_IPV6)
+bool ipv6_mod_enabled(void);
+
 static inline struct ipv6_pinfo *inet6_sk(const struct sock *__sk)
 {
        return sk_fullsock(__sk) ? inet_sk(__sk)->pinet6 : NULL;
@@ -310,6 +328,11 @@ static inline int inet_v6_ipv6only(const struct sock *sk)
 #define ipv6_only_sock(sk)     0
 #define ipv6_sk_rxinfo(sk)     0
 
+static inline bool ipv6_mod_enabled(void)
+{
+       return false;
+}
+
 static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk)
 {
        return NULL;