Hi Máté, Thank you for the patch! Yet something to improve: [auto build test ERROR on nf-next/master] url: https://github.com/0day-ci/linux/commits/M-t-Eckl/netfilter-nft-add-support-for-native-socket-matching/20180601-094951 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master config: openrisc-allyesconfig (attached as .config) compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental) reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=openrisc All errors (new ones prefixed by >>): In file included from net/netfilter/nft_socket.c:7:0: include/net/netfilter/nf_socket.h: In function 'nf_sk_is_transparent': include/net/netfilter/nf_socket.h:12:12: error: dereferencing pointer to incomplete type 'struct sock' switch (sk->sk_state) { ^~ >> include/net/netfilter/nf_socket.h:13:7: error: 'TCP_TIME_WAIT' undeclared (first use in this function) case TCP_TIME_WAIT: ^~~~~~~~~~~~~ include/net/netfilter/nf_socket.h:13:7: note: each undeclared identifier is reported only once for each function it appears in >> include/net/netfilter/nf_socket.h:14:10: error: implicit declaration of function 'inet_twsk' [-Werror=implicit-function-declaration] return inet_twsk(sk)->tw_transparent; ^~~~~~~~~ include/net/netfilter/nf_socket.h:14:23: error: invalid type argument of '->' (have 'int') return inet_twsk(sk)->tw_transparent; ^~ >> include/net/netfilter/nf_socket.h:15:7: error: 'TCP_NEW_SYN_RECV' undeclared (first use in this function) case TCP_NEW_SYN_RECV: ^~~~~~~~~~~~~~~~ >> include/net/netfilter/nf_socket.h:16:10: error: implicit declaration of function 'inet_rsk' [-Werror=implicit-function-declaration] return inet_rsk(inet_reqsk(sk))->no_srccheck; ^~~~~~~~ >> include/net/netfilter/nf_socket.h:16:19: error: implicit declaration of function 'inet_reqsk' [-Werror=implicit-function-declaration] return inet_rsk(inet_reqsk(sk))->no_srccheck; ^~~~~~~~~~ include/net/netfilter/nf_socket.h:16:34: error: invalid type argument of '->' (have 'int') return inet_rsk(inet_reqsk(sk))->no_srccheck; ^~ >> include/net/netfilter/nf_socket.h:18:10: error: implicit declaration of function 'inet_sk' [-Werror=implicit-function-declaration] return inet_sk(sk)->transparent; ^~~~~~~ include/net/netfilter/nf_socket.h:18:21: error: invalid type argument of '->' (have 'int') return inet_sk(sk)->transparent; ^~ In file included from include/net/inet_sock.h:27:0, from net/netfilter/nft_socket.c:8: include/net/request_sock.h: At top level: include/net/request_sock.h:72:36: error: conflicting types for 'inet_reqsk' static inline struct request_sock *inet_reqsk(const struct sock *sk) ^~~~~~~~~~ In file included from net/netfilter/nft_socket.c:7:0: include/net/netfilter/nf_socket.h:16:19: note: previous implicit declaration of 'inet_reqsk' was here return inet_rsk(inet_reqsk(sk))->no_srccheck; ^~~~~~~~~~ In file included from net/netfilter/nft_socket.c:8:0: include/net/inet_sock.h:107:41: error: conflicting types for 'inet_rsk' static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) ^~~~~~~~ In file included from net/netfilter/nft_socket.c:7:0: include/net/netfilter/nf_socket.h:16:10: note: previous implicit declaration of 'inet_rsk' was here return inet_rsk(inet_reqsk(sk))->no_srccheck; ^~~~~~~~ In file included from net/netfilter/nft_socket.c:8:0: include/net/inet_sock.h:273:33: error: conflicting types for 'inet_sk' static inline struct inet_sock *inet_sk(const struct sock *sk) ^~~~~~~ In file included from net/netfilter/nft_socket.c:7:0: include/net/netfilter/nf_socket.h:18:10: note: previous implicit declaration of 'inet_sk' was here return inet_sk(sk)->transparent; ^~~~~~~ include/net/netfilter/nf_socket.h: In function 'nf_sk_is_transparent': include/net/netfilter/nf_socket.h:20:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ cc1: some warnings being treated as errors vim +/TCP_TIME_WAIT +13 include/net/netfilter/nf_socket.h 8db4c5be Pablo Neira Ayuso 2016-10-27 9 8db4c5be Pablo Neira Ayuso 2016-10-27 10 static inline bool nf_sk_is_transparent(struct sock *sk) 8db4c5be Pablo Neira Ayuso 2016-10-27 11 { 8db4c5be Pablo Neira Ayuso 2016-10-27 @12 switch (sk->sk_state) { 8db4c5be Pablo Neira Ayuso 2016-10-27 @13 case TCP_TIME_WAIT: 8db4c5be Pablo Neira Ayuso 2016-10-27 @14 return inet_twsk(sk)->tw_transparent; 8db4c5be Pablo Neira Ayuso 2016-10-27 @15 case TCP_NEW_SYN_RECV: 8db4c5be Pablo Neira Ayuso 2016-10-27 @16 return inet_rsk(inet_reqsk(sk))->no_srccheck; 8db4c5be Pablo Neira Ayuso 2016-10-27 17 default: 8db4c5be Pablo Neira Ayuso 2016-10-27 @18 return inet_sk(sk)->transparent; 8db4c5be Pablo Neira Ayuso 2016-10-27 19 } 8db4c5be Pablo Neira Ayuso 2016-10-27 20 } 8db4c5be Pablo Neira Ayuso 2016-10-27 21 :::::: The code at line 13 was first introduced by commit :::::: 8db4c5be88f62ffd7a552f70687a10c614dc697b netfilter: move socket lookup infrastructure to nf_socket_ipv{4,6}.c :::::: TO: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> :::::: CC: Pablo Neira Ayuso <pablo@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