X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=include%2Fnet%2Fnet_namespace.h;h=4faf6612ecacc05d2b00877691e440338ebb0144;hb=df5a2a1fbca44bebeebb78530ac93c734f289707;hp=fd87963a0ea5878cecae892541b9fc9f79e64814;hpb=9cd11c0c47b8690b47e7573311ce5c483cb344ed;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index fd87963a0ea5..4faf6612ecac 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) @@ -66,6 +67,7 @@ struct net { struct hlist_head *dev_name_head; struct hlist_head *dev_index_head; unsigned int dev_base_seq; /* protected by rtnl_mutex */ + int ifindex; /* core fib_rules */ struct list_head rules_ops; @@ -80,6 +82,9 @@ struct net { #if IS_ENABLED(CONFIG_IPV6) struct netns_ipv6 ipv6; #endif +#if defined(CONFIG_IP_SCTP) || defined(CONFIG_IP_SCTP_MODULE) + struct netns_sctp sctp; +#endif #if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE) struct netns_dccp dccp; #endif @@ -87,6 +92,9 @@ struct net { struct netns_xt xt; #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) struct netns_ct ct; +#endif +#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) + struct netns_nf_frag nf_frag; #endif struct sock *nfnl; struct sock *nfnl_stash; @@ -105,6 +113,13 @@ struct net { atomic_t rt_genid; }; +/* + * ifindex generation is per-net namespace, and loopback is + * always the 1st device in ns (see net_dev_init), thus any + * loopback device should get ifindex 1 + */ + +#define LOOPBACK_IFINDEX 1 #include