Hi Pablo,

I love your patch! Yet something to improve:

[auto build test ERROR on nf/master]

url:    
https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/netfilter-add-nf_-tcp-udp-sctp-icmp-dccp-icmpv6-generic-_pernet/20181102-101813
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: i386-randconfig-n3-11020807 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from net/netfilter/nfnetlink_cttimeout.c:31:0:
   include/net/netfilter/nf_conntrack_timeout.h: In function 'nf_sctp_pernet':
   include/net/netfilter/nf_conntrack_timeout.h:119:30: error: 'struct 
nf_ip_net' has no member named 'sctp'; did you mean 'tcp'?
     return &net->ct.nf_ct_proto.sctp;
                                 ^~~~
                                 tcp
   net/netfilter/nfnetlink_cttimeout.c: In function 
'cttimeout_default_fill_info':
>> net/netfilter/nfnetlink_cttimeout.c:429:33: error: dereferencing pointer to 
>> incomplete type 'struct nf_sctp_net'
      timeouts = nf_sctp_pernet(net)->timeouts;
                                    ^~

vim +429 net/netfilter/nfnetlink_cttimeout.c

   381  
   382  static int
   383  cttimeout_default_fill_info(struct net *net, struct sk_buff *skb, u32 
portid,
   384                              u32 seq, u32 type, int event, u16 l3num,
   385                              const struct nf_conntrack_l4proto *l4proto)
   386  {
   387          unsigned int *timeouts;
   388          struct nlmsghdr *nlh;
   389          struct nfgenmsg *nfmsg;
   390          unsigned int flags = portid ? NLM_F_MULTI : 0;
   391          struct nlattr *nest_parms;
   392          int ret;
   393  
   394          event = nfnl_msg_type(NFNL_SUBSYS_CTNETLINK_TIMEOUT, event);
   395          nlh = nlmsg_put(skb, portid, seq, event, sizeof(*nfmsg), flags);
   396          if (nlh == NULL)
   397                  goto nlmsg_failure;
   398  
   399          nfmsg = nlmsg_data(nlh);
   400          nfmsg->nfgen_family = AF_UNSPEC;
   401          nfmsg->version = NFNETLINK_V0;
   402          nfmsg->res_id = 0;
   403  
   404          if (nla_put_be16(skb, CTA_TIMEOUT_L3PROTO, htons(l3num)) ||
   405              nla_put_u8(skb, CTA_TIMEOUT_L4PROTO, l4proto->l4proto))
   406                  goto nla_put_failure;
   407  
   408          nest_parms = nla_nest_start(skb, CTA_TIMEOUT_DATA | 
NLA_F_NESTED);
   409          if (!nest_parms)
   410                  goto nla_put_failure;
   411  
   412          switch (l4proto->l4proto) {
   413          case IPPROTO_ICMP:
   414                  timeouts = &nf_icmp_pernet(net)->timeout;
   415                  break;
   416          case IPPROTO_TCP:
   417                  timeouts = nf_tcp_pernet(net)->timeouts;
   418                  break;
   419          case IPPROTO_UDP:
   420                  timeouts = nf_udp_pernet(net)->timeouts;
   421                  break;
   422          case IPPROTO_DCCP:
   423                  timeouts = nf_dccp_pernet(net)->dccp_timeout;
   424                  break;
   425          case IPPROTO_ICMPV6:
   426                  timeouts = &nf_icmpv6_pernet(net)->timeout;
   427                  break;
   428          case IPPROTO_SCTP:
 > 429                  timeouts = nf_sctp_pernet(net)->timeouts;
   430                  break;
   431          case 255:
   432                  timeouts = &nf_generic_pernet(net)->timeout;
   433                  break;
   434          default:
   435                  WARN_ON_ONCE(1);
   436                  goto nla_put_failure;
   437          }
   438  
   439          ret = l4proto->ctnl_timeout.obj_to_nlattr(skb, timeouts);
   440          if (ret < 0)
   441                  goto nla_put_failure;
   442  
   443          nla_nest_end(skb, nest_parms);
   444  
   445          nlmsg_end(skb, nlh);
   446          return skb->len;
   447  
   448  nlmsg_failure:
   449  nla_put_failure:
   450          nlmsg_cancel(skb, nlh);
   451          return -1;
   452  }
   453  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to