1. 21 Jul, 2014 7 commits
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · a8138f42
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains updates for your net-next tree,
      they are:
      
      1) Use kvfree() helper function from x_tables, from Eric Dumazet.
      
      2) Remove extra timer from the conntrack ecache extension, use a
         workqueue instead to redeliver lost events to userspace instead,
         from Florian Westphal.
      
      3) Removal of the ulog targets for ebtables and iptables. The nflog
         infrastructure superseded this almost 9 years ago, time to get rid
         of this code.
      
      4) Replace the list of loggers by an array now that we can only have
         two possible non-overlapping logger flavours, ie. kernel ring buffer
         and netlink logging.
      
      5) Move Eric Dumazet's log buffer code to nf_log to reuse it from
         all of the supported per-family loggers.
      
      6) Consolidate nf_log_packet() as an unified interface for packet logging.
         After this patch, if the struct nf_loginfo is available, it explicitly
         selects the logger that is used.
      
      7) Move ip and ip6 logging code from xt_LOG to the corresponding
         per-family loggers. Thus, x_tables and nf_tables share the same code
         for packet logging.
      
      8) Add generic ARP packet logger, which is used by nf_tables. The
         format aims to be consistent with the output of xt_LOG.
      
      9) Add generic bridge packet logger. Again, this is used by nf_tables
         and it routes the packets to the real family loggers. As a result,
         we get consistent logging format for the bridge family. The ebt_log
         logging code has been intentionally left in place not to break
         backward compatibility since the logging output differs from xt_LOG.
      
      10) Update nft_log to explicitly request the required family logger when
          needed.
      
      11) Finish nft_log so it supports arp, ip, ip6, bridge and inet families.
          Allowing selection between netlink and kernel buffer ring logging.
      
      12) Several fixes coming after the netfilter core logging changes spotted
          by robots.
      
      13) Use IS_ENABLED() macros whenever possible in the netfilter tree,
          from Duan Jiong.
      
      14) Removal of a couple of unnecessary branch before kfree, from Fabian
          Frederick.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a8138f42
    • Veaceslav Falico's avatar
      net: print a notification on device rename · 6fe82a39
      Veaceslav Falico authored
      Currently it's done silently (from the kernel part), and thus it might be
      hard to track the renames from logs.
      
      Add a simple netdev_info() to notify the rename, but only in case the
      previous name was valid.
      
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Eric Dumazet <edumazet@google.com>
      CC: Vlad Yasevich <vyasevic@redhat.com>
      CC: stephen hemminger <stephen@networkplumber.org>
      CC: Jerry Chu <hkchu@google.com>
      CC: Ben Hutchings <bhutchings@solarflare.com>
      CC: David Laight <David.Laight@ACULAB.COM>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6fe82a39
    • David S. Miller's avatar
      Merge branch 'netdev_print' · 4ec68378
      David S. Miller authored
      Veaceslav Falico says:
      
      ====================
      net: print net_device name/state more often
      
      Currently we use net_device->name only if it's the NETREG_REGISTERED
      reg_state, otherwise we return "(unregistered device)".
      
      However, we always populate net_device->name on creation, so it's always
      available to us for use. The only caveat is that we might have a name like
      "eth%d", in which case we cannot use it as it might change in the future.
      
      Also, the net_device might not be NETREG_UNREGISTERED when the function is
      called (_UNINITIALIZED, _UNREGISTERING, _RELEASED, _DUMMY), so it's
      misleading.
      
      So, a better way would be to always return the dev->name in netdev_name(),
      unless it's in the form of "eth%d" or it's empty, then return
      "unnamed net_device". This way we'll always return the name in
      NETREG_REGISTERED reg_state, and also return it in other states, when
      possible.
      
      Also, to be more verbose on non-NETREG_REGISTERED states, add a function
      netdev_reg_state(), which returns a string describing the state, and use it
      in netdev_printk()-related functions. If the dev is in NETREG_REGISTERED
      state then a void string is regurned and, thus, nothing changes.
      
      After these two patches we'll have the same behaviour in the usual cases,
      and more verbose in non-standardad/buggy ones.
      
      v2->v3:
      Correct the string for _UNINITIALIZED and warn on a bad reg_state,
      per Joe Perches's comments.
      
      v1->v2:
      As Tom Gundersen suggested, there might be a case when we have an empty
      string as a name for a device, so account this also and return "unnamed
      device" for that case too.
      ====================
      Signed-off-by: default avatarVeaceslav Falico <vfalico@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ec68378
    • Veaceslav Falico's avatar
      net: print net_device reg_state in netdev_* unless it's registered · ccc7f496
      Veaceslav Falico authored
      This way we'll always know in what status the device is, unless it's
      running normally (i.e. NETDEV_REGISTERED).
      
      Also, emit a warning once in case of a bad reg_state.
      
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Jason Baron <jbaron@akamai.com>
      CC: Eric Dumazet <edumazet@google.com>
      CC: Vlad Yasevich <vyasevic@redhat.com>
      CC: stephen hemminger <stephen@networkplumber.org>
      CC: Jerry Chu <hkchu@google.com>
      CC: Ben Hutchings <bhutchings@solarflare.com>
      CC: Joe Perches <joe@perches.com>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ccc7f496
    • Veaceslav Falico's avatar
      net: use dev->name in netdev_pr* when it's available · c6f854d5
      Veaceslav Falico authored
      netdev_name() returns dev->name only when the net_device is in
      NETREG_REGISTERED state.
      
      However, dev->name is always populated on creation, so we can easily use
      it.
      
      There are two cases when there's no real name - when it's an empty string
      or when the name is in form of "eth%d", then netdev_name() returns "unnamed
      net_device".
      
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Tom Gundersen <teg@jklm.no>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@gmail.com>
      Acked-by: default avatarTom Gundersen <teg@jklm.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c6f854d5
    • Veaceslav Falico's avatar
      bonding: make it possible to have unlimited nested upper vlans · 3e403a77
      Veaceslav Falico authored
      Currently we're limited by a constant level of vlan nestings, and fail to
      find anything beyound that level (currently 2).
      
      To fix this - remove the limit of nestings when going through device tree,
      and when the end device is found - allocate the needed amount of vlan tags
      and return them, instead of found/not found.
      
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3e403a77
    • Cong Wang's avatar
      net_sched: hold tcf_lock in netdevice notifier · 224e923c
      Cong Wang authored
      We modify mirred action (m->tcfm_dev) in netdev event, we need to
      prevent on-going mirred actions from reading freed m->tcfm_dev.
      So we need to acquire this spin lock.
      
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarCong Wang <cwang@twopensource.com>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      224e923c
  2. 20 Jul, 2014 1 commit
  3. 17 Jul, 2014 32 commits