07 Jul, 2013

1 commit

  • Several people reported the warning: "kernel BUG at kernel/timer.c:729!"
    and the stack trace is:

    #7 [ffff880214d25c10] mod_timer+501 at ffffffff8106d905
    #8 [ffff880214d25c50] br_multicast_del_pg.isra.20+261 at ffffffffa0731d25 [bridge]
    #9 [ffff880214d25c80] br_multicast_disable_port+88 at ffffffffa0732948 [bridge]
    #10 [ffff880214d25cb0] br_stp_disable_port+154 at ffffffffa072bcca [bridge]
    #11 [ffff880214d25ce8] br_device_event+520 at ffffffffa072a4e8 [bridge]
    #12 [ffff880214d25d18] notifier_call_chain+76 at ffffffff8164aafc
    #13 [ffff880214d25d50] raw_notifier_call_chain+22 at ffffffff810858f6
    #14 [ffff880214d25d60] call_netdevice_notifiers+45 at ffffffff81536aad
    #15 [ffff880214d25d80] dev_close_many+183 at ffffffff81536d17
    #16 [ffff880214d25dc0] rollback_registered_many+168 at ffffffff81537f68
    #17 [ffff880214d25de8] rollback_registered+49 at ffffffff81538101
    #18 [ffff880214d25e10] unregister_netdevice_queue+72 at ffffffff815390d8
    #19 [ffff880214d25e30] __tun_detach+272 at ffffffffa074c2f0 [tun]
    #20 [ffff880214d25e88] tun_chr_close+45 at ffffffffa074c4bd [tun]
    #21 [ffff880214d25ea8] __fput+225 at ffffffff8119b1f1
    #22 [ffff880214d25ef0] ____fput+14 at ffffffff8119b3fe
    #23 [ffff880214d25f00] task_work_run+159 at ffffffff8107cf7f
    #24 [ffff880214d25f30] do_notify_resume+97 at ffffffff810139e1
    #25 [ffff880214d25f50] int_signal+18 at ffffffff8164f292

    this is due to I forgot to check if mp->timer is armed in
    br_multicast_del_pg(). This bug is introduced by
    commit 9f00b2e7cf241fa389733d41b6 (bridge: only expire the mdb entry
    when query is received).

    Same for __br_mdb_del().

    Tested-by: poma
    Reported-by: LiYonghua
    Reported-by: Robert Hancock
    Cc: Herbert Xu
    Cc: Stephen Hemminger
    Cc: "David S. Miller"
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     

26 Jun, 2013

1 commit


24 Jun, 2013

1 commit


20 Jun, 2013

1 commit

  • Conflicts:
    drivers/net/wireless/ath/ath9k/Kconfig
    drivers/net/xen-netback/netback.c
    net/batman-adv/bat_iv_ogm.c
    net/wireless/nl80211.c

    The ath9k Kconfig conflict was a change of a Kconfig option name right
    next to the deletion of another option.

    The xen-netback conflict was overlapping changes involving the
    handling of the notify list in xen_netbk_rx_action().

    Batman conflict resolution provided by Antonio Quartulli, basically
    keep everything in both conflict hunks.

    The nl80211 conflict is a little more involved. In 'net' we added a
    dynamic memory allocation to nl80211_dump_wiphy() to fix a race that
    Linus reported. Meanwhile in 'net-next' the handlers were converted
    to use pre and post doit handlers which use a flag to determine
    whether to hold the RTNL mutex around the operation.

    However, the dump handlers to not use this logic. Instead they have
    to explicitly do the locking. There were apparent bugs in the
    conversion of nl80211_dump_wiphy() in that we were not dropping the
    RTNL mutex in all the return paths, and it seems we very much should
    be doing so. So I fixed that whilst handling the overlapping changes.

    To simplify the initial returns, I take the RTNL mutex after we try
    to allocate 'tb'.

    Signed-off-by: David S. Miller

    David S. Miller
     

18 Jun, 2013

1 commit

  • General Queries (the one with the Multicast Address field
    set to zero / '::') are supposed to have a Maximum Response Delay
    of [Query Response Interval], while for Multicast-Address-Specific
    Queries it is [Last Listener Query Interval] - not the other way
    round. (see RFC2710, section 7.3+7.8)

    Signed-off-by: Linus Lüssing
    Signed-off-by: David S. Miller

    Linus Lüssing
     

13 Jun, 2013

1 commit

  • Reduce the uses of this unnecessary typedef.

    Done via perl script:

    $ git grep --name-only -w ctl_table net | \
    xargs perl -p -i -e '\
    sub trim { my ($local) = @_; $local =~ s/(^\s+|\s+$)//g; return $local; } \
    s/\b(?<!struct\s)ctl_table\b(\s*\*\s*|\s+\w+)/"struct ctl_table " . trim($1)/ge'

    Reflow the modified lines that now exceed 80 columns.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

11 Jun, 2013

2 commits

  • Add a flag to control flood of unicast traffic. By default, flood is
    on and the bridge will flood unicast traffic if it doesn't know
    the destination. When the flag is turned off, unicast traffic
    without an FDB will not be forwarded to the specified port.

    Signed-off-by: Vlad Yasevich
    Reviewed-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • Allow user to control whether mac learning is enabled on the port.
    By default, mac learning is enabled. Disabling mac learning will
    cause new dynamic FDB entries to not be created for a particular port.

    Signed-off-by: Vlad Yasevich
    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Vlad Yasevich
     

06 Jun, 2013

1 commit

  • Conflicts:
    net/netfilter/nf_log.c

    The conflict in nf_log.c is that in 'net' we added CONFIG_PROC_FS
    protection around foo_proc_entry() calls to fix a build failure,
    whereas in Pablo's tree a guard if() test around a call is
    remove_proc_entry() was removed. Trivially resolved.

    Pablo Neira Ayuso says:

    ====================
    The following patchset contains the first batch of
    Netfilter/IPVS updates for your net-next tree, they are:

    * Three patches with improvements and code refactorization
    for nfnetlink_queue, from Florian Westphal.

    * FTP helper now parses replies without brackets, as RFC1123
    recommends, from Jeff Mahoney.

    * Rise a warning to tell everyone about ULOG deprecation,
    NFLOG has been already in the kernel tree for long time
    and supersedes the old logging over netlink stub, from
    myself.

    * Don't panic if we fail to load netfilter core framework,
    just bail out instead, from myself.

    * Add cond_resched_rcu, used by IPVS to allow rescheduling
    while walking over big hashtables, from Simon Horman.

    * Change type of IPVS sysctl_sync_qlen_max sysctl to avoid
    possible overflow, from Zhang Yanfei.

    * Use strlcpy instead of strncpy to skip zeroing of already
    initialized area to write the extension names in ebtables,
    from Chen Gang.

    * Use already existing per-cpu notrack object from xt_CT,
    from Eric Dumazet.

    * Save explicit socket lookup in xt_socket now that we have
    early demux, also from Eric Dumazet.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

29 May, 2013

1 commit

  • So far, only net_device * could be passed along with netdevice notifier
    event. This patch provides a possibility to pass custom structure
    able to provide info that event listener needs to know.

    Signed-off-by: Jiri Pirko

    v2->v3: fix typo on simeth
    shortened dev_getter
    shortened notifier_info struct name
    v1->v2: fix notifier_call parameter in call_netdevice_notifier()
    Signed-off-by: David S. Miller

    Jiri Pirko
     

25 May, 2013

1 commit


24 May, 2013

1 commit


23 May, 2013

5 commits

  • This target has been superseded by NFLOG. Spot a warning
    so we prepare removal in a couple of years.

    Signed-off-by: Pablo Neira Ayuso
    Acked-by: Gao feng

    Pablo Neira Ayuso
     
  • 'name' has already set all zero when it is defined, so not need let
    strncpy() to pad it again.

    'name' is a string, better always let is NUL terminated, so use
    strlcpy() instead of strncpy().

    Signed-off-by: Chen Gang
    Acked-by: Bart De Schuymer
    Signed-off-by: Pablo Neira Ayuso

    Chen Gang
     
  • Continue sending queries when leave is received if the user marks
    it as a querier.

    Cc: Herbert Xu
    Cc: Stephen Hemminger
    Cc: "David S. Miller"
    Cc: Adam Baker
    Signed-off-by: Cong Wang
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Cong Wang
     
  • Currently we arm the expire timer when the mdb entry is added,
    however, this causes problem when there is no querier sent
    out after that.

    So we should only arm the timer when a corresponding query is
    received, as suggested by Herbert.

    And he also mentioned "if there is no querier then group
    subscriptions shouldn't expire. There has to be at least one querier
    in the network for this thing to work. Otherwise it just degenerates
    into a non-snooping switch, which is OK."

    Cc: Herbert Xu
    Cc: Stephen Hemminger
    Cc: "David S. Miller"
    Cc: Adam Baker
    Signed-off-by: Cong Wang
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Cong Wang
     
  • Quote from Adam:
    "If it is believed that the use of 0.0.0.0
    as the IP address is what is causing strange behaviour on other devices
    then is there a good reason that a bridge rather than a router shouldn't
    be the active querier? If not then using the bridge IP address and
    having the querier enabled by default may be a reasonable solution
    (provided that our querier obeys the election rules and shuts up if it
    sees a query from a lower IP address that isn't 0.0.0.0). Just because a
    device is the elected querier for IGMP doesn't appear to mean it is
    required to perform any other routing functions."

    And introduce a new troggle for it, as suggested by Herbert.

    Suggested-by: Adam Baker
    Cc: Herbert Xu
    Cc: Stephen Hemminger
    Cc: "David S. Miller"
    Cc: Adam Baker
    Signed-off-by: Cong Wang
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Cong Wang
     

15 May, 2013

1 commit

  • Since (69b34fb netfilter: xt_LOG: add net namespace support
    for xt_LOG), we hit this:

    [ 4224.708977] BUG: unable to handle kernel NULL pointer dereference at 0000000000000388
    [ 4224.709074] IP: [] ipt_log_packet+0x29/0x270

    when callling log functions from conntrack both in and out
    are NULL i.e. the net pointer is invalid.

    Adding struct net *net in call to nf_logfn() will secure that
    there always is a vaild net ptr.

    Reported as netfilter's bugzilla bug 818:
    https://bugzilla.netfilter.org/show_bug.cgi?id=818

    Reported-by: Ronald
    Signed-off-by: Hans Schillstrom
    Signed-off-by: Pablo Neira Ayuso

    Hans Schillstrom
     

04 May, 2013

1 commit

  • A bridge should only send topology change notice if it is not
    the root bridge. It is possible for message age timer to elect itself
    as a new root bridge, and still have a topology change timer running
    but waiting for bridge lock on other CPU.

    Solve the race by checking if we are root bridge before continuing.
    This was the root cause of the cases where br_send_tcn_bpdu would OOPS.

    Reported-by: JerryKang
    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     

01 May, 2013

1 commit

  • Bridge can crash while trying to send topology change packet.
    This happens if root port can't be found. This was reported by user
    but currently unable to reproduce it easily. The STP conditions that cause
    this are not known yet, but the problem doesn't have to be fatal.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     

29 Apr, 2013

1 commit

  • Current bridge fdb update code does not seem to update the port
    during fdb update. This patch adds a check for fdb dst (port)
    change during fdb update. Also rearranges the call to
    fdb_notify to send only one notification for create and update.

    Changelog:
    v2 - Change notify flag to bool

    Signed-off-by: Roopa Prabhu
    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    roopa
     

23 Apr, 2013

1 commit

  • Conflicts:
    drivers/net/ethernet/emulex/benet/be_main.c
    drivers/net/ethernet/intel/igb/igb_main.c
    drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
    include/net/scm.h
    net/batman-adv/routing.c
    net/ipv4/tcp_input.c

    The e{uid,gid} --> {uid,gid} credentials fix conflicted with the
    cleanup in net-next to now pass cred structs around.

    The be2net driver had a bug fix in 'net' that overlapped with the VLAN
    interface changes by Patrick McHardy in net-next.

    An IGB conflict existed because in 'net' the build_skb() support was
    reverted, and in 'net-next' there was a comment style fix within that
    code.

    Several batman-adv conflicts were resolved by making sure that all
    calls to batadv_is_my_mac() are changed to have a new bat_priv first
    argument.

    Eric Dumazet's TS ECR fix in TCP in 'net' conflicted with the F-RTO
    rewrite in 'net-next', mostly overlapping changes.

    Thanks to Stephen Rothwell and Antonio Quartulli for help with several
    of these merge resolutions.

    Signed-off-by: David S. Miller

    David S. Miller
     

20 Apr, 2013

4 commits


16 Apr, 2013

1 commit


08 Apr, 2013

1 commit

  • Pablo Neira Ayuso says:

    ====================
    The following patchset contains Netfilter and IPVS updates for
    your net-next tree, most relevantly they are:

    * Add net namespace support to NFLOG, ULOG and ebt_ulog and NFQUEUE.
    The LOG and ebt_log target has been also adapted, but they still
    depend on the syslog netnamespace that seems to be missing, from
    Gao Feng.

    * Don't lose indications of congestion in IPv6 fragmentation handling,
    from Hannes Frederic Sowa.i

    * IPVS conversion to use RCU, including some code consolidation patches
    and optimizations, also some from Julian Anastasov.

    * cpu fanout support for NFQUEUE, from Holger Eitzenberger.

    * Better error reporting to userspace when dropping packets from
    all our _*_[xfrm|route]_me_harder functions, from Patrick McHardy.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

06 Apr, 2013

3 commits

  • Add pernet support to ebt_ulog by means of the new nf_log_set
    function added in (30e0c6a netfilter: nf_log: prepare net
    namespace support for loggers).

    This patch also make ulog_buffers and netlink socket
    ebtulognl per netns.

    Signed-off-by: Gao feng
    Signed-off-by: Pablo Neira Ayuso

    Gao feng
     
  • Add pernet support to ebt_log by means of the new nf_log_set
    function added in (30e0c6a netfilter: nf_log: prepare net
    namespace support for loggers).

    Since syslog ns has yet not been implemented, we don't want
    the containers to DDOS host's syslogd. So only enable ebt_log
    only from init_net and wait for syslog ns support.

    Signed-off-by: Gao feng
    Signed-off-by: Pablo Neira Ayuso

    Gao feng
     
  • This patch adds netns support to nf_log and it prepares netns
    support for existing loggers. It is composed of four major
    changes.

    1) nf_log_register has been split to two functions: nf_log_register
    and nf_log_set. The new nf_log_register is used to globally
    register the nf_logger and nf_log_set is used for enabling
    pernet support from nf_loggers.

    Per netns is not yet complete after this patch, it comes in
    separate follow up patches.

    2) Add net as a parameter of nf_log_bind_pf. Per netns is not
    yet complete after this patch, it only allows to bind the
    nf_logger to the protocol family from init_net and it skips
    other cases.

    3) Adapt all nf_log_packet callers to pass netns as parameter.
    After this patch, this function only works for init_net.

    4) Make the sysctl net/netfilter/nf_log pernet.

    Signed-off-by: Gao feng
    Signed-off-by: Pablo Neira Ayuso

    Gao feng
     

03 Apr, 2013

1 commit

  • commit 00cfec37484761 (net: add a synchronize_net() in
    netdev_rx_handler_unregister())
    allows us to remove the synchronized_net() call from del_nbp()

    Signed-off-by: Eric Dumazet
    Cc: Veaceslav Falico
    Cc: Stephen Hemminger
    Acked-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    Eric Dumazet
     

29 Mar, 2013

2 commits


28 Mar, 2013

2 commits

  • Add a new constant ETH_P_802_3_MIN, the minimum ethernet type for
    an 802.3 frame. Frames with a lower value in the ethernet type field
    are Ethernet II.

    Also update all the users of this value that David Miller and
    I could find to use the new constant.

    Also correct a bug in util.c. The comparison with ETH_P_802_3_MIN
    should be >= not >.

    As suggested by Jesse Gross.

    Compile tested only.

    Cc: David Miller
    Cc: Jesse Gross
    Cc: Karsten Keil
    Cc: John W. Linville
    Cc: Johannes Berg
    Cc: Bart De Schuymer
    Cc: Stephen Hemminger
    Cc: Patrick McHardy
    Cc: Marcel Holtmann
    Cc: Gustavo Padovan
    Cc: Johan Hedberg
    Cc: linux-bluetooth@vger.kernel.org
    Cc: netfilter-devel@vger.kernel.org
    Cc: bridge@lists.linux-foundation.org
    Cc: linux-wireless@vger.kernel.org
    Cc: linux1394-devel@lists.sourceforge.net
    Cc: linux-media@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Cc: dev@openvswitch.org
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Stefan Richter
    Signed-off-by: Simon Horman
    Signed-off-by: David S. Miller

    Simon Horman
     
  • Conflicts:
    include/net/ipip.h

    The changes made to ipip.h in 'net' were already included
    in 'net-next' before that header was moved to another location.

    Signed-off-by: David S. Miller

    David S. Miller
     

26 Mar, 2013

1 commit

  • Pablo Neira Ayuso says:

    ====================
    The following patchset contains Netfilter/IPVS updates for
    your net-next tree, they are:

    * Better performance in nfnetlink_queue by avoiding copy from the
    packet to netlink message, from Eric Dumazet.

    * Remove unnecessary locking in the exit path of ebt_ulog, from Gao Feng.

    * Use new function ipv6_iface_scope_id in nf_ct_ipv6, from Hannes Frederic Sowa.

    * A couple of sparse fixes for IPVS, from Julian Anastasov.

    * Use xor hashing in nfnetlink_queue, as suggested by Eric Dumazet, from
    myself.

    * Allow to dump expectations per master conntrack via ctnetlink, from myself.

    * A couple of cleanups to use PTR_RET in module init path, from Silviu-Mihai
    Popescu.

    * Remove nf_conntrack module a bit faster if netns are in use, from
    Vladimir Davydov.

    * Use checksum_partial in ip6t_NPT, from YOSHIFUJI Hideaki.

    * Sparse fix for nf_conntrack, from Stephen Hemminger.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

25 Mar, 2013

2 commits

  • When I tried to set mac address of a bridge interface to a mac
    address which already learned on this bridge, I got system hang.

    The cause is straight forward: function br_fdb_change_mac_address
    calls fdb_insert with NULL source nbp. Then an fdb lookup is
    performed. If an fdb entry is found and it's local, it's OK. But
    if it's not local, source is dereferenced for printk without NULL
    check.

    Signed-off-by: Hong Zhiguo
    Signed-off-by: David S. Miller

    Hong zhi guo
     
  • When neither IFF_BRIDGE nor IFF_BRIDGE_PORT is set,
    and afspec == NULL but protinfo != NULL, we run into
    "if (err == 0) br_ifinfo_notify(RTM_NEWLINK, p);" with
    random value in ret.

    Thanks to Sergei for pointing out the error in commit comments.

    Signed-off-by: Hong Zhiguo
    Signed-off-by: David S. Miller

    Hong zhi guo
     

22 Mar, 2013

1 commit