1. 20 6月, 2012 31 次提交
  2. 19 6月, 2012 9 次提交
    • S
      net: lpc_eth: Driver cleanup · b31525d1
      stigge@antcom.de 提交于
      This patch removes some nowadays superfluous definitions (one unused define and
      an obsolete function forward declaration) and corrects a netdev_err() to
      netdev_dbg().
      Signed-off-by: NRoland Stigge <stigge@antcom.de>
      Signed-off-by: NAlexandre Pereira da Silva <aletes.xgr@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b31525d1
    • P
      netfilter: fix missing symbols if CONFIG_NETFILTER_NETLINK_QUEUE_CT unset · 674147e2
      Pablo Neira Ayuso 提交于
      ERROR: "nfqnl_ct_parse" [net/netfilter/nfnetlink_queue.ko] undefined!
      ERROR: "nfqnl_ct_seq_adjust" [net/netfilter/nfnetlink_queue.ko] undefined!
      ERROR: "nfqnl_ct_put" [net/netfilter/nfnetlink_queue.ko] undefined!
      ERROR: "nfqnl_ct_get" [net/netfilter/nfnetlink_queue.ko] undefined!
      
      We have to use CONFIG_NETFILTER_NETLINK_QUEUE_CT in
      include/net/netfilter/nfnetlink_queue.h, not CONFIG_NF_CONNTRACK.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      674147e2
    • D
      Merge branch 'master' of git://1984.lsi.us.es/nf-next · 6bdc5f49
      David S. Miller 提交于
      Pablo says:
      
      ====================
      The following patchset provides fixes for issues that were recently introduced
      by my new cthelper infrastructure. They have been spotted by Randy Dunlap,
      Andrew Morton and Dan Carpenter.
      
      The patches provide:
      
      * compilation fixes if CONFIG_NF_CONNTRACK is disabled: I moved all the
        conntrack code from nfnetlink_queue.c to nfnetlink_queue_ct.c to avoid
        peppering the entire code with lots of ifdefs. I needed to rename
        nfnetlink_queue.c to nfnetlink_queue_core.c to get it working with the
        Makefile tweaks I've added.
      
      * fix NULL pointer dereference via ctnetlink while trying to change the helper
        for an existing conntrack entry. I don't find any reasonable use case for
        changing the helper from one to another in run-time. Thus, now ctnetlink
        returns -EOPNOTSUPP for this operation.
      
      * fix possible out-of-bound zeroing of the conntrack extension area due to
        the helper automatic assignation routine.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6bdc5f49
    • D
      Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge · f032537f
      David S. Miller 提交于
      Included changes:
      
      * major skb->data pointer usage fix
      * interval version update
      * added get_ethtool_stats() support
      * endianess clean up
      * routing protocol API improvement wrt TT commit code
      * fix locking in hash table code
      * minor cleanups and fixes
      f032537f
    • P
      netfilter: nfnetlink_queue: fix compilation with NF_CONNTRACK disabled · 7c622345
      Pablo Neira Ayuso 提交于
      In "9cb01766 netfilter: add glue code to integrate nfnetlink_queue and ctnetlink"
      the compilation with NF_CONNTRACK disabled is broken. This patch fixes this
      issue.
      
      I have moved the conntrack part into nfnetlink_queue_ct.c to avoid
      peppering the entire nfnetlink_queue.c code with ifdefs.
      
      I also needed to rename nfnetlink_queue.c to nfnetlink_queue_pkt.c
      to update the net/netfilter/Makefile to support conditional compilation
      of the conntrack integration.
      
      This patch also adds CONFIG_NETFILTER_QUEUE_CT in case you want to explicitly
      disable the integration between nf_conntrack and nfnetlink_queue.
      Reported-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      7c622345
    • P
      netfilter: fix compilation of the nfnl_cthelper if NF_CONNTRACK is unset · 6e9c2db3
      Pablo Neira Ayuso 提交于
      This patch fixes the compilation of net/netfilter/nfnetlink_cthelper.c
      if CONFIG_NF_CONNTRACK is not set.
      
      This patch also moves the definition of the cthelper infrastructure to
      the scope of NF_CONNTRACK things.
      
      I have also renamed NETFILTER_NETLINK_CTHELPER by NF_CT_NETLINK_HELPER,
      to use similar names to other nf_conntrack_netlink extensions. Better now
      that this has been only for two days in David's tree.
      
      Two new dependencies have been added:
      
      * NF_CT_NETLINK
      * NETFILTER_NETLINK_QUEUE
      
      Since these infrastructure requires both ctnetlink and nfqueue.
      Reported-by: NRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      6e9c2db3
    • P
      netfilter: nf_ct_helper: disable automatic helper re-assignment of different type · 32f53760
      Pablo Neira Ayuso 提交于
      This patch modifies __nf_ct_try_assign_helper in a way that invalidates support
      for the following scenario:
      
      1) attach the helper A for first time when the conntrack is created
      2) attach new (different) helper B due to changes the reply tuple caused by NAT
      
      eg. port redirection from TCP/21 to TCP/5060 with both FTP and SIP helpers
      loaded, which seems to be a quite unorthodox scenario.
      
      I can provide a more elaborated patch to support this scenario but explicit
      helper attachment provides a better solution for this since now the use can
      attach the helpers consistently, without relying on the automatic helper
      lookup magic.
      
      This patch fixes a possible out of bound zeroing of the conntrack helper
      extension if the helper B uses more memory for its private data than
      helper A.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      32f53760
    • P
      netfilter: ctnetlink: fix NULL dereference while trying to change helper · fd7462de
      Pablo Neira Ayuso 提交于
      The patch 1afc5679: "netfilter: nf_ct_helper: implement variable
      length helper private data" from Jun 7, 2012, leads to the following
      Smatch complaint:
      
      net/netfilter/nf_conntrack_netlink.c:1231 ctnetlink_change_helper()
               error: we previously assumed 'help->helper' could be null (see line 1228)
      
      This NULL dereference can be triggered with the following sequence:
      
      1) attach the helper for first time when the conntrack is created.
      2) remove the helper module or detach the helper from the conntrack
         via ctnetlink.
      3) attach helper again (the same or different one, no matter) to the
         that existing conntrack again via ctnetlink.
      
      This patch fixes the problem by removing the use case that allows you
      to re-assign again a helper for one conntrack entry via ctnetlink since
      I cannot find any practical use for it.
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      fd7462de
    • M
      dafe94b2