Re: [PATCH 1/2 WIP nf-next] netfilter: implement Passive OS fingerprint module in nft_osf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Fernando,

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/Fernando-Fernandez-Mancera/netfilter-implement-Passive-OS-fingerprint-module-in-nft_osf/20180712-203655
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
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
        GCC_VERSION=8.1.0 make.cross ARCH=ia64 

Note: the linux-review/Fernando-Fernandez-Mancera/netfilter-implement-Passive-OS-fingerprint-module-in-nft_osf/20180712-203655 HEAD da6169296e9d1fd467a0717ebcdd42305488927d builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   In file included from include/linux/netfilter/nf_osf.h:1,
                    from net/netfilter/nft_osf.c:2:
>> include/uapi/linux/netfilter/nf_osf.h:66:24: error: 'MAX_IPOPTLEN' undeclared here (not in a function); did you mean 'MAY_OPEN'?
     struct nf_osf_opt opt[MAX_IPOPTLEN];
                           ^~~~~~~~~~~~
                           MAY_OPEN
>> include/uapi/linux/netfilter/nf_osf.h:71:17: error: field 'ip' has incomplete type
     struct iphdr   ip;
                    ^~
>> include/uapi/linux/netfilter/nf_osf.h:72:18: error: field 'tcp' has incomplete type
     struct tcphdr   tcp;
                     ^~~
>> net/netfilter/nft_osf.c:20:47: error: 'NFTA_OSF_MAX' undeclared here (not in a function); did you mean 'NFTA_OBJ_MAX'?
    static const struct nla_policy nft_osf_policy[NFTA_OSF_MAX + 1] = {
                                                  ^~~~~~~~~~~~
                                                  NFTA_OBJ_MAX
>> net/netfilter/nft_osf.c:21:3: error: 'NFTA_OSF_GENRE' undeclared here (not in a function); did you mean 'NF_OSF_GENRE'?
     [NFTA_OSF_GENRE] = { .type = NLA_STRING, .len = OSF_GENRE_SIZE },
      ^~~~~~~~~~~~~~
      NF_OSF_GENRE
>> net/netfilter/nft_osf.c:21:3: error: array index in initializer not of integer type
   net/netfilter/nft_osf.c:21:3: note: (near initialization for 'nft_osf_policy')
>> net/netfilter/nft_osf.c:21:23: error: field name not in record or union initializer
     [NFTA_OSF_GENRE] = { .type = NLA_STRING, .len = OSF_GENRE_SIZE },
                          ^
   net/netfilter/nft_osf.c:21:23: note: (near initialization for 'nft_osf_policy')
   net/netfilter/nft_osf.c:21:43: error: field name not in record or union initializer
     [NFTA_OSF_GENRE] = { .type = NLA_STRING, .len = OSF_GENRE_SIZE },
                                              ^
   net/netfilter/nft_osf.c:21:43: note: (near initialization for 'nft_osf_policy')
>> net/netfilter/nft_osf.c:22:3: error: 'NFTA_OSF_FLAGS' undeclared here (not in a function); did you mean 'NFTA_FIB_FLAGS'?
     [NFTA_OSF_FLAGS] = { .type = NLA_U32 },
      ^~~~~~~~~~~~~~
      NFTA_FIB_FLAGS
   net/netfilter/nft_osf.c:22:3: error: array index in initializer not of integer type
   net/netfilter/nft_osf.c:22:3: note: (near initialization for 'nft_osf_policy')
   net/netfilter/nft_osf.c:22:23: error: field name not in record or union initializer
     [NFTA_OSF_FLAGS] = { .type = NLA_U32 },
                          ^
   net/netfilter/nft_osf.c:22:23: note: (near initialization for 'nft_osf_policy')
>> net/netfilter/nft_osf.c:23:3: error: 'NFTA_OSF_LOGLEVEL' undeclared here (not in a function); did you mean 'NFTA_LOG_LEVEL'?
     [NFTA_OSF_LOGLEVEL] = { .type = NLA_U32 },
      ^~~~~~~~~~~~~~~~~
      NFTA_LOG_LEVEL
   net/netfilter/nft_osf.c:23:3: error: array index in initializer not of integer type
   net/netfilter/nft_osf.c:23:3: note: (near initialization for 'nft_osf_policy')
   net/netfilter/nft_osf.c:23:26: error: field name not in record or union initializer
     [NFTA_OSF_LOGLEVEL] = { .type = NLA_U32 },
                             ^
   net/netfilter/nft_osf.c:23:26: note: (near initialization for 'nft_osf_policy')
>> net/netfilter/nft_osf.c:24:3: error: 'NFTA_OSF_TTL' undeclared here (not in a function); did you mean 'NF_OSF_TTL'?
     [NFTA_OSF_TTL]  = { .type = NLA_U32 },
      ^~~~~~~~~~~~
      NF_OSF_TTL
   net/netfilter/nft_osf.c:24:3: error: array index in initializer not of integer type
   net/netfilter/nft_osf.c:24:3: note: (near initialization for 'nft_osf_policy')
   net/netfilter/nft_osf.c:24:22: error: field name not in record or union initializer
     [NFTA_OSF_TTL]  = { .type = NLA_U32 },
                         ^
   net/netfilter/nft_osf.c:24:22: note: (near initialization for 'nft_osf_policy')
   net/netfilter/nft_osf.c:20:32: warning: 'nft_osf_policy' defined but not used [-Wunused-variable]
    static const struct nla_policy nft_osf_policy[NFTA_OSF_MAX + 1] = {
                                   ^~~~~~~~~~~~~~
--
   In file included from include/linux/netfilter/nf_osf.h:1,
                    from net//netfilter/nft_osf.c:2:
>> include/uapi/linux/netfilter/nf_osf.h:66:24: error: 'MAX_IPOPTLEN' undeclared here (not in a function); did you mean 'MAY_OPEN'?
     struct nf_osf_opt opt[MAX_IPOPTLEN];
                           ^~~~~~~~~~~~
                           MAY_OPEN
>> include/uapi/linux/netfilter/nf_osf.h:71:17: error: field 'ip' has incomplete type
     struct iphdr   ip;
                    ^~
>> include/uapi/linux/netfilter/nf_osf.h:72:18: error: field 'tcp' has incomplete type
     struct tcphdr   tcp;
                     ^~~
   net//netfilter/nft_osf.c:20:47: error: 'NFTA_OSF_MAX' undeclared here (not in a function); did you mean 'NFTA_OBJ_MAX'?
    static const struct nla_policy nft_osf_policy[NFTA_OSF_MAX + 1] = {
                                                  ^~~~~~~~~~~~
                                                  NFTA_OBJ_MAX
   net//netfilter/nft_osf.c:21:3: error: 'NFTA_OSF_GENRE' undeclared here (not in a function); did you mean 'NF_OSF_GENRE'?
     [NFTA_OSF_GENRE] = { .type = NLA_STRING, .len = OSF_GENRE_SIZE },
      ^~~~~~~~~~~~~~
      NF_OSF_GENRE
   net//netfilter/nft_osf.c:21:3: error: array index in initializer not of integer type
   net//netfilter/nft_osf.c:21:3: note: (near initialization for 'nft_osf_policy')
   net//netfilter/nft_osf.c:21:23: error: field name not in record or union initializer
     [NFTA_OSF_GENRE] = { .type = NLA_STRING, .len = OSF_GENRE_SIZE },
                          ^
   net//netfilter/nft_osf.c:21:23: note: (near initialization for 'nft_osf_policy')
   net//netfilter/nft_osf.c:21:43: error: field name not in record or union initializer
     [NFTA_OSF_GENRE] = { .type = NLA_STRING, .len = OSF_GENRE_SIZE },
                                              ^
   net//netfilter/nft_osf.c:21:43: note: (near initialization for 'nft_osf_policy')
   net//netfilter/nft_osf.c:22:3: error: 'NFTA_OSF_FLAGS' undeclared here (not in a function); did you mean 'NFTA_FIB_FLAGS'?
     [NFTA_OSF_FLAGS] = { .type = NLA_U32 },
      ^~~~~~~~~~~~~~
      NFTA_FIB_FLAGS
   net//netfilter/nft_osf.c:22:3: error: array index in initializer not of integer type
   net//netfilter/nft_osf.c:22:3: note: (near initialization for 'nft_osf_policy')
   net//netfilter/nft_osf.c:22:23: error: field name not in record or union initializer
     [NFTA_OSF_FLAGS] = { .type = NLA_U32 },
                          ^
   net//netfilter/nft_osf.c:22:23: note: (near initialization for 'nft_osf_policy')
   net//netfilter/nft_osf.c:23:3: error: 'NFTA_OSF_LOGLEVEL' undeclared here (not in a function); did you mean 'NFTA_LOG_LEVEL'?
     [NFTA_OSF_LOGLEVEL] = { .type = NLA_U32 },
      ^~~~~~~~~~~~~~~~~
      NFTA_LOG_LEVEL
   net//netfilter/nft_osf.c:23:3: error: array index in initializer not of integer type
   net//netfilter/nft_osf.c:23:3: note: (near initialization for 'nft_osf_policy')
   net//netfilter/nft_osf.c:23:26: error: field name not in record or union initializer
     [NFTA_OSF_LOGLEVEL] = { .type = NLA_U32 },
                             ^
   net//netfilter/nft_osf.c:23:26: note: (near initialization for 'nft_osf_policy')
   net//netfilter/nft_osf.c:24:3: error: 'NFTA_OSF_TTL' undeclared here (not in a function); did you mean 'NF_OSF_TTL'?
     [NFTA_OSF_TTL]  = { .type = NLA_U32 },
      ^~~~~~~~~~~~
      NF_OSF_TTL
   net//netfilter/nft_osf.c:24:3: error: array index in initializer not of integer type
   net//netfilter/nft_osf.c:24:3: note: (near initialization for 'nft_osf_policy')
   net//netfilter/nft_osf.c:24:22: error: field name not in record or union initializer
     [NFTA_OSF_TTL]  = { .type = NLA_U32 },
                         ^
   net//netfilter/nft_osf.c:24:22: note: (near initialization for 'nft_osf_policy')
   net//netfilter/nft_osf.c:20:32: warning: 'nft_osf_policy' defined but not used [-Wunused-variable]
    static const struct nla_policy nft_osf_policy[NFTA_OSF_MAX + 1] = {
                                   ^~~~~~~~~~~~~~

vim +66 include/uapi/linux/netfilter/nf_osf.h

bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  53  
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  54  struct nf_osf_user_finger {
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  55  	struct nf_osf_wc	wss;
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  56  
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  57  	__u8	ttl, df;
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  58  	__u16	ss, mss;
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  59  	__u16	opt_num;
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  60  
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  61  	char	genre[MAXGENRELEN];
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  62  	char	version[MAXGENRELEN];
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  63  	char	subtype[MAXGENRELEN];
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  64  
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  65  	/* MAX_IPOPTLEN is maximum if all options are NOPs or EOLs */
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03 @66  	struct nf_osf_opt	opt[MAX_IPOPTLEN];
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  67  };
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  68  
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  69  struct nf_osf_nlmsg {
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  70  	struct nf_osf_user_finger	f;
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03 @71  	struct iphdr			ip;
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03 @72  	struct tcphdr			tcp;
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  73  };
bfb15f2a9 Fernando Fernandez Mancera 2018-05-03  74  

:::::: The code at line 66 was first introduced by commit
:::::: bfb15f2a95cbbc548b59abf8007d0fdb35fdfee5 netfilter: extract Passive OS fingerprint infrastructure from xt_osf

:::::: TO: Fernando Fernandez Mancera <ffmancera@xxxxxxxxxx>
:::::: 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


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux