1. 15 Oct, 2015 1 commit
    • Pablo Neira Ayuso's avatar
      netfilter: nfnetlink_log: consolidate check for instance in nfulnl_recv_config() · 336a3b3e
      Pablo Neira Ayuso authored
      This patch consolidates the check for valid logger instance once we have
      passed the command handling:
      
      The config message that we receive may contain the following info:
      
      1) Command only: We always get a valid instance pointer if we just
         created it. In case that the instance is being destroyed or the
         command is unknown, we jump to exit path of nfulnl_recv_config().
         This patch doesn't modify this handling.
      
      2) Config only: In this case, the instance must always exist since the
         user is asking for configuration updates. If the instance doesn't exist
         this returns -ENODEV.
      
      3) No command and no configs are specified: This case is rare. The
         user is sending us a config message with neither commands nor
         config options. In this case, we have to check if the instance exists
         and bail out otherwise. Before this patch, it was possible to send a
         config message with no command and no config updates for an
         unexisting instance without triggering an error. So this is the only
         case that changes.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Tested-by: default avatarKen-ichirou MATSUZAWA <chamaken@gmail.com>
      336a3b3e
  2. 14 Oct, 2015 2 commits
  3. 13 Oct, 2015 6 commits
  4. 12 Oct, 2015 6 commits
  5. 07 Oct, 2015 2 commits
    • Simon Horman's avatar
      ipvs: Remove possibly unused variables from ip_vs_conn_net_{init,cleanup} · 92240e8d
      Simon Horman authored
      If CONFIG_PROC_FS is undefined then the arguments of proc_create()
      and remove_proc_entry() are unused. As a result the net variables of
      ip_vs_conn_net_{init,cleanup} are unused.
      
      net/netfilter/ipvs//ip_vs_conn.c: In function ‘ip_vs_conn_net_init’:
      net/netfilter/ipvs//ip_vs_conn.c:1350:14: warning: unused variable ‘net’ [-Wunused-variable]
      net/netfilter/ipvs//ip_vs_conn.c: In function ‘ip_vs_conn_net_cleanup’:
      net/netfilter/ipvs//ip_vs_conn.c:1361:14: warning: unused variable ‘net’ [-Wunused-variable]
      ...
      
      Resolve this by dereferencing net as needed rather than storing it
      in a variable.
      
      Fixes: 3d993766 ("ipvs: Pass ipvs not net into ip_vs_control_net_(init|cleanup)")
      Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
      Acked-by: default avatarJulian Anastasov <ja@ssi.bg>
      92240e8d
    • David Ahern's avatar
      ipvs: Remove possibly unused variable from ip_vs_out · ed1c9f0e
      David Ahern authored
      Eric's net namespace changes in 1b75097d leaves net unreferenced if
      CONFIG_IP_VS_IPV6 is not enabled:
      
      ../net/netfilter/ipvs/ip_vs_core.c: In function ‘ip_vs_out’:
      ../net/netfilter/ipvs/ip_vs_core.c:1177:14: warning: unused variable ‘net’ [-Wunused-variable]
      
      After the net refactoring there is only 1 user; push the reference to the
      1 user. While the line length slightly exceeds 80 it seems to be the
      best change.
      
      Fixes: 1b75097d("ipvs: Pass ipvs into ip_vs_out")
      Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Acked-by: default avatarJulian Anastasov <ja@ssi.bg>
      [horms: updated subject]
      Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
      ed1c9f0e
  6. 05 Oct, 2015 7 commits
  7. 04 Oct, 2015 2 commits
    • Pablo Neira Ayuso's avatar
      netfilter: rename nfnetlink_queue_core.c to nfnetlink_queue.c · 32f40c5f
      Pablo Neira Ayuso authored
      Now that we have integrated the ct glue code into nfnetlink_queue without
      introducing dependencies with the conntrack code.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      32f40c5f
    • Pablo Neira Ayuso's avatar
      netfilter: nfnetlink_queue: get rid of nfnetlink_queue_ct.c · b7bd1809
      Pablo Neira Ayuso authored
      The original intention was to avoid dependencies between nfnetlink_queue and
      conntrack without ifdef pollution. However, we can achieve this by moving the
      conntrack dependent code into ctnetlink and keep some glue code to access the
      nfq_ct indirection from nfqueue.
      
      After this patch, the nfq_ct indirection is always compiled in the netfilter
      core to avoid polluting nfqueue with ifdefs. Thus, if nf_conntrack is not
      compiled this results in only 8-bytes of memory waste in x86_64.
      
      This patch also adds ctnetlink_nfqueue_seqadj() to avoid that the nf_conn
      structure layout if exposed to nf_queue, which creates another dependency with
      nf_conntrack at compilation time.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      b7bd1809
  8. 03 Oct, 2015 14 commits