24 Apr, 2012

1 commit

  • bridge: set fake_rtable's dst to NULL to avoid kernel Oops

    when bridge is deleted before tap/vif device's delete, kernel may
    encounter an oops because of NULL reference to fake_rtable's dst.
    Set fake_rtable's dst to NULL before sending packets out can solve
    this problem.

    v4 reformat, change br_drop_fake_rtable(skb) to {}

    v3 enrich commit header

    v2 introducing new flag DST_FAKE_RTABLE to dst_entry struct.

    [ Use "do { } while (0)" for nop br_drop_fake_rtable()
    implementation -DaveM ]

    Acked-by: Eric Dumazet
    Signed-off-by: Peter Huang
    Signed-off-by: David S. Miller

    Peter Huang (Peng)
     

11 Apr, 2012

1 commit

  • As it stands the bridge IGMP snooping system will respond to
    group leave messages with queries for remaining membership.
    This is both unnecessary and undesirable. First of all any
    multicast routers present should be doing this rather than us.
    What's more the queries that we send may end up upsetting other
    multicast snooping swithces in the system that are buggy.

    In fact, we can simply remove the code that send these queries
    because the existing membership expiry mechanism doesn't rely
    on them anyway.

    So this patch simply removes all code associated with group
    queries in response to group leave messages.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

10 Mar, 2012

1 commit


08 Mar, 2012

2 commits


07 Mar, 2012

3 commits

  • When net.bridge.bridge-nf-filter-vlan-tagged is 0 (default), vlan packets
    arriving should not be sent to ip(6)tables by bridge netfilter.

    However, it turns out that we currently always send VLAN packets to
    netfilter, if ..
    a), CONFIG_VLAN_8021Q is enabled ; or
    b), CONFIG_VLAN_8021Q is not set but rx vlan offload is enabled
    on the bridge port.

    This is because bridge netfilter treats skb with
    skb->protocol == ETH_P_IP{V6} as "non-vlan packet".

    With rx vlan offload on or CONFIG_VLAN_8021Q=y, the vlan header has
    already been removed here, and we cannot rely on skb->protocol alone.

    Fix this by only using skb->protocol if the skb has no vlan tag,
    or if a vlan tag is present and filter-vlan-tagged bridge netfilter
    sysctl is enabled.

    We cannot remove the skb->protocol == htons(ETH_P_8021Q) test
    because the vlan tag is still around in the CONFIG_VLAN_8021Q=n &&
    "ethtool -K $itf rxvlan off" case.

    reproducer:
    iptables -t raw -I PREROUTING -i br0
    iptables -t raw -I PREROUTING -i br0.1

    Then send packets to an ip address configured on br0.1 interface.
    Even with net.bridge.bridge-nf-filter-vlan-tagged=0, the 1st rule
    will match instead of the 2nd one.

    With this patch applied, the 2nd rule will match instead.
    In the non-local address case, netfilter won't be consulted after
    this patch unless the sysctl is switched on.

    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Florian Westphal
     
  • In adf7ff8, a invalid dereference was added in ebt_make_names.

    CC [M] net/bridge/netfilter/ebtables.o
    net/bridge/netfilter/ebtables.c: In function `ebt_make_names':
    net/bridge/netfilter/ebtables.c:1371:20: warning: `t' may be used uninitialized in this function [-Wuninitialized]

    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Pablo Neira Ayuso
     
  • user-space ebtables expects 32 bytes-long names, but xt_match names
    use 29 bytes. We have to copy less 29 bytes and then, make sure we
    fill the remaining bytes with zeroes.

    Signed-off-by: Santosh Nayak
    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Santosh Nayak
     

06 Mar, 2012

2 commits


05 Mar, 2012

2 commits


02 Mar, 2012

1 commit


25 Feb, 2012

1 commit


24 Feb, 2012

1 commit


16 Feb, 2012

1 commit


17 Jan, 2012

1 commit


24 Dec, 2011

1 commit


23 Dec, 2011

2 commits

  • Chris Boot reported crashes occurring in ipv6_select_ident().

    [ 461.457562] RIP: 0010:[] []
    ipv6_select_ident+0x31/0xa7

    [ 461.578229] Call Trace:
    [ 461.580742]
    [ 461.582870] [] ? udp6_ufo_fragment+0x124/0x1a2
    [ 461.589054] [] ? ipv6_gso_segment+0xc0/0x155
    [ 461.595140] [] ? skb_gso_segment+0x208/0x28b
    [ 461.601198] [] ? ipv6_confirm+0x146/0x15e
    [nf_conntrack_ipv6]
    [ 461.608786] [] ? nf_iterate+0x41/0x77
    [ 461.614227] [] ? dev_hard_start_xmit+0x357/0x543
    [ 461.620659] [] ? nf_hook_slow+0x73/0x111
    [ 461.626440] [] ? br_parse_ip_options+0x19a/0x19a
    [bridge]
    [ 461.633581] [] ? dev_queue_xmit+0x3af/0x459
    [ 461.639577] [] ? br_dev_queue_push_xmit+0x72/0x76
    [bridge]
    [ 461.646887] [] ? br_nf_post_routing+0x17d/0x18f
    [bridge]
    [ 461.653997] [] ? nf_iterate+0x41/0x77
    [ 461.659473] [] ? br_flood+0xfa/0xfa [bridge]
    [ 461.665485] [] ? nf_hook_slow+0x73/0x111
    [ 461.671234] [] ? br_flood+0xfa/0xfa [bridge]
    [ 461.677299] [] ?
    nf_bridge_update_protocol+0x20/0x20 [bridge]
    [ 461.684891] [] ? nf_ct_zone+0xa/0x17 [nf_conntrack]
    [ 461.691520] [] ? br_flood+0xfa/0xfa [bridge]
    [ 461.697572] [] ? NF_HOOK.constprop.8+0x3c/0x56
    [bridge]
    [ 461.704616] [] ?
    nf_bridge_push_encap_header+0x1c/0x26 [bridge]
    [ 461.712329] [] ? br_nf_forward_finish+0x8a/0x95
    [bridge]
    [ 461.719490] [] ?
    nf_bridge_pull_encap_header+0x1c/0x27 [bridge]
    [ 461.727223] [] ? br_nf_forward_ip+0x1c0/0x1d4 [bridge]
    [ 461.734292] [] ? nf_iterate+0x41/0x77
    [ 461.739758] [] ? __br_deliver+0xa0/0xa0 [bridge]
    [ 461.746203] [] ? nf_hook_slow+0x73/0x111
    [ 461.751950] [] ? __br_deliver+0xa0/0xa0 [bridge]
    [ 461.758378] [] ? NF_HOOK.constprop.4+0x56/0x56
    [bridge]

    This is caused by bridge netfilter special dst_entry (fake_rtable), a
    special shared entry, where attaching an inetpeer makes no sense.

    Problem is present since commit 87c48fa3b46 (ipv6: make fragment
    identifications less predictable)

    Introduce DST_NOPEER dst flag and make sure ipv6_select_ident() and
    __ip_select_ident() fallback to the 'no peer attached' handling.

    Reported-by: Chris Boot
    Tested-by: Chris Boot
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Commit 618f9bc74a039da76 (net: Move mtu handling down to the protocol
    depended handlers) forgot the bridge netfilter case, adding a NULL
    dereference in ip_fragment().

    Reported-by: Chris Boot
    CC: Steffen Klassert
    Signed-off-by: Eric Dumazet
    Acked-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Eric Dumazet
     

17 Dec, 2011

1 commit


12 Dec, 2011

1 commit


09 Dec, 2011

3 commits

  • If user has configured a MAC address that is not one of the existing
    ports of the bridge, then we need to add a special entry in the forwarding
    table. This forwarding table entry has no outgoing port so it has to be
    treated a little differently. The special entry is reported by the netlink
    interface with ifindex of bridge, but ignored by the old interface since there
    is no usable way to put it in the ABI.

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

    stephen hemminger
     
  • Pass bridge to fdb_notify so it can determine correct namespace based
    on namespace of bridge rather than namespace of destination port.
    Also makes next patch easier.

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

    stephen hemminger
     
  • Move fdb_notify outside of fdb_create. This fixes the problem
    that notification of local entries are not flagged correctly.

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

    stephen hemminger
     

06 Dec, 2011

1 commit


04 Dec, 2011

1 commit

  • While parsing through IPv6 extension headers, fragment headers are
    skipped making them invisible to the caller. This reports the
    fragment offset of the last header in order to make it possible to
    determine whether the packet is fragmented and, if so whether it is
    a first or last fragment.

    Signed-off-by: Jesse Gross

    Jesse Gross
     

03 Dec, 2011

1 commit


02 Dec, 2011

1 commit

  • When in user-stp mode, bridge master do not follow state of its slaves, so
    after the following sequence of events it can stuck forever in no-carrier
    state:
    1) turn stp off
    2) put all slaves down - master device will follow their state and also go in
    no-carrier state
    3) turn stp on with bridge-stp script returning 0 (go to the user-stp mode)
    Now bridge master won't follow slaves' state and will never reach running
    state.

    This patch solves the problem by making user-stp and kernel-stp behavior
    similar regarding master following slaves' states.

    Signed-off-by: Vitalii Demianets
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Vitalii Demianets
     

23 Nov, 2011

1 commit


22 Nov, 2011

1 commit


17 Nov, 2011

3 commits


14 Nov, 2011

2 commits

  • More changes to the recent code to support control of forwarding
    database via netlink.
    * Support NTF_USE like neighbour table
    * Validate state bits from application
    * Only send notifications (and change bits) if new entry is
    different.

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

    stephen hemminger
     
  • multicast_lock is taken in softirq context, so we should use
    spin_lock_bh() in userspace.

    call-chain in softirq context:
    run_timer_softirq()
    br_multicast_query_expired()

    call-chain in userspace:
    sysfs_write_file()
    store_multicast_snooping()
    br_multicast_toggle()

    Signed-off-by: Andrew Vagin
    Signed-off-by: David S. Miller

    Andrey Vagin
     

07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

01 Nov, 2011

3 commits