tree: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master head: ca6f98035ddfbdb00aa698ea0357e0183a13af5c commit: b0688222a8f3983fe38da61f5791d3903f66bb4a [10/11] netfilter: move socket lookup infrastructure to nf_socket_ipv{4,6}.c config: i386-randconfig-x078-201644 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: git checkout b0688222a8f3983fe38da61f5791d3903f66bb4a # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): In file included from net/ipv4/netfilter/nf_socket_ipv4.c:19:0: >> include/net/netfilter/nf_conntrack.h:83:22: error: field 'ct_general' has incomplete type struct nf_conntrack ct_general; ^~~~~~~~~~ include/net/netfilter/nf_conntrack.h: In function 'nf_ct_get': >> include/net/netfilter/nf_conntrack.h:170:30: error: 'const struct sk_buff' has no member named 'nfct'; did you mean 'next'? return (struct nf_conn *)skb->nfct; ^~ include/net/netfilter/nf_conntrack.h: In function 'nf_ct_put': >> include/net/netfilter/nf_conntrack.h:177:2: error: implicit declaration of function 'nf_conntrack_put' [-Werror=implicit-function-declaration] nf_conntrack_put(&ct->ct_general); ^~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/ct_general +83 include/net/netfilter/nf_conntrack.h b476b72a Jesper Dangaard Brouer 2014-03-03 77 * b476b72a Jesper Dangaard Brouer 2014-03-03 78 * Hint, SKB address this struct and refcnt via skb->nfct and b476b72a Jesper Dangaard Brouer 2014-03-03 79 * helpers nf_conntrack_get() and nf_conntrack_put(). b476b72a Jesper Dangaard Brouer 2014-03-03 80 * Helper nf_ct_put() equals nf_conntrack_put() by dec refcnt, b476b72a Jesper Dangaard Brouer 2014-03-03 81 * beware nf_ct_get() is different and don't inc refcnt. b476b72a Jesper Dangaard Brouer 2014-03-03 82 */ 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 @83 struct nf_conntrack ct_general; 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 84 440f0d58 Patrick McHardy 2009-06-10 85 spinlock_t lock; b7779d06 Jesper Dangaard Brouer 2014-03-03 86 u16 cpu; 440f0d58 Patrick McHardy 2009-06-10 87 6c8dee98 Florian Westphal 2016-06-11 88 #ifdef CONFIG_NF_CONNTRACK_ZONES 6c8dee98 Florian Westphal 2016-06-11 89 struct nf_conntrack_zone zone; 6c8dee98 Florian Westphal 2016-06-11 90 #endif 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 91 /* XXX should I move this to the tail ? - Y.K */ 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 92 /* These are my tuples; original and reply */ 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 93 struct nf_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX]; 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 94 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 95 /* Have we seen traffic both ways yet? (bitset) */ 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 96 unsigned long status; 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 97 f330a7fd Florian Westphal 2016-08-25 98 /* jiffies32 when this ct is considered dead */ f330a7fd Florian Westphal 2016-08-25 99 u32 timeout; 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 100 0c5c9fb5 Eric W. Biederman 2015-03-11 101 possible_net_t ct_net; 0c5c9fb5 Eric W. Biederman 2015-03-11 102 c41884ce Florian Westphal 2014-11-24 103 /* all members below initialized via memset */ c41884ce Florian Westphal 2014-11-24 104 u8 __nfct_init_offset[0]; c41884ce Florian Westphal 2014-11-24 105 c41884ce Florian Westphal 2014-11-24 106 /* If we were expected by an expectation, this will be it */ c41884ce Florian Westphal 2014-11-24 107 struct nf_conn *master; c41884ce Florian Westphal 2014-11-24 108 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 109 #if defined(CONFIG_NF_CONNTRACK_MARK) 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 110 u_int32_t mark; 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 111 #endif 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 112 7c9728c3 James Morris 2006-06-09 113 #ifdef CONFIG_NF_CONNTRACK_SECMARK 7c9728c3 James Morris 2006-06-09 114 u_int32_t secmark; 7c9728c3 James Morris 2006-06-09 115 #endif 7c9728c3 James Morris 2006-06-09 116 ecfab2c9 Yasuyuki Kozakai 2007-07-07 117 /* Extensions */ ecfab2c9 Yasuyuki Kozakai 2007-07-07 118 struct nf_ct_ext *ext; e5fc9e7a Changli Gao 2010-11-12 119 7c966435 Florian Westphal 2016-07-05 120 #if IS_ENABLED(CONFIG_NF_NAT) 870190a9 Florian Westphal 2016-07-05 121 struct rhash_head nat_bysource; 7c966435 Florian Westphal 2016-07-05 122 #endif e5fc9e7a Changli Gao 2010-11-12 123 /* Storage reserved for other modules, must be the last member */ e5fc9e7a Changli Gao 2010-11-12 124 union nf_conntrack_proto proto; 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 125 }; 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 126 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 127 static inline struct nf_conn * 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 128 nf_ct_tuplehash_to_ctrack(const struct nf_conntrack_tuple_hash *hash) 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 129 { 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 130 return container_of(hash, struct nf_conn, 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 131 tuplehash[hash->tuple.dst.dir]); 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 132 } 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 133 5e8fbe2a Patrick McHardy 2008-04-14 134 static inline u_int16_t nf_ct_l3num(const struct nf_conn *ct) 5e8fbe2a Patrick McHardy 2008-04-14 135 { 5e8fbe2a Patrick McHardy 2008-04-14 136 return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num; 5e8fbe2a Patrick McHardy 2008-04-14 137 } 5e8fbe2a Patrick McHardy 2008-04-14 138 5e8fbe2a Patrick McHardy 2008-04-14 139 static inline u_int8_t nf_ct_protonum(const struct nf_conn *ct) 5e8fbe2a Patrick McHardy 2008-04-14 140 { 5e8fbe2a Patrick McHardy 2008-04-14 141 return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum; 5e8fbe2a Patrick McHardy 2008-04-14 142 } 5e8fbe2a Patrick McHardy 2008-04-14 143 f2f3e38c Pablo Neira Ayuso 2009-06-02 144 #define nf_ct_tuple(ct, dir) (&(ct)->tuplehash[dir].tuple) f2f3e38c Pablo Neira Ayuso 2009-06-02 145 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 146 /* get master conntrack via master expectation */ 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 147 #define master_ct(conntr) (conntr->master) 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 148 5a1fb391 Alexey Dobriyan 2008-10-08 149 extern struct net init_net; 5a1fb391 Alexey Dobriyan 2008-10-08 150 5a1fb391 Alexey Dobriyan 2008-10-08 151 static inline struct net *nf_ct_net(const struct nf_conn *ct) 5a1fb391 Alexey Dobriyan 2008-10-08 152 { c2d9ba9b Eric Dumazet 2010-06-01 153 return read_pnet(&ct->ct_net); 5a1fb391 Alexey Dobriyan 2008-10-08 154 } 5a1fb391 Alexey Dobriyan 2008-10-08 155 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 156 /* Alter reply tuple (maybe alter helper). */ 4e77be46 Joe Perches 2013-09-23 157 void nf_conntrack_alter_reply(struct nf_conn *ct, 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 158 const struct nf_conntrack_tuple *newreply); 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 159 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 160 /* Is this tuple taken? (ignoring any belonging to the given 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 161 conntrack). */ 4e77be46 Joe Perches 2013-09-23 162 int nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple, 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 163 const struct nf_conn *ignored_conntrack); 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 164 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 165 /* Return conntrack_info and tuple hash for given skb. */ 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 166 static inline struct nf_conn * 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 167 nf_ct_get(const struct sk_buff *skb, enum ip_conntrack_info *ctinfo) 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 168 { 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 169 *ctinfo = skb->nfctinfo; 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 @170 return (struct nf_conn *)skb->nfct; 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 171 } 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 172 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 173 /* decrement reference count on a conntrack */ 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 174 static inline void nf_ct_put(struct nf_conn *ct) 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 175 { 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 176 NF_CT_ASSERT(ct); 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 @177 nf_conntrack_put(&ct->ct_general); 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 178 } 9fb9cbb1 Yasuyuki Kozakai 2005-11-09 179 b9f78f9f Pablo Neira Ayuso 2006-03-22 180 /* Protocol module loading */ :::::: The code at line 83 was first introduced by commit :::::: 9fb9cbb1082d6b31fb45aa1a14432449a0df6cf1 [NETFILTER]: Add nf_conntrack subsystem. :::::: TO: Yasuyuki Kozakai <yasuyuki.kozakai@xxxxxxxxxxxxx> :::::: CC: David S. Miller <davem@xxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip