19 Jun, 2015

1 commit


18 Jun, 2015

1 commit


01 Oct, 2014

1 commit

  • Eric reports build failure with
    CONFIG_BRIDGE_NETFILTER=n

    We insist to build br_nf_core.o unconditionally, but we must only do so
    if br_netfilter was enabled, else it fails to build due to
    functions being defined to empty stubs (and some structure members
    being defined out).

    Also, BRIDGE_NETFILTER=y|m makes no sense when BRIDGE=n.

    Fixes: 34666d467 (netfilter: bridge: move br_netfilter out of the core)
    Reported-by: Eric Dumazet
    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Florian Westphal
     

27 Sep, 2014

1 commit

  • Jesper reported that br_netfilter always registers the hooks since
    this is part of the bridge core. This harms performance for people that
    don't need this.

    This patch modularizes br_netfilter so it can be rmmod'ed, thus,
    the hooks can be unregistered. I think the bridge netfilter should have
    been a separated module since the beginning, Patrick agreed on that.

    Note that this is breaking compatibility for users that expect that
    bridge netfilter is going to be available after explicitly 'modprobe
    bridge' or via automatic load through brctl.

    However, the damage can be easily undone by modprobing br_netfilter.
    The bridge core also spots a message to provide a clue to people that
    didn't notice that this has been deprecated.

    On top of that, the plan is that nftables will not rely on this software
    layer, but integrate the connection tracking into the bridge layer to
    enable stateful filtering and NAT, which is was bridge netfilter users
    seem to require.

    This patch still keeps the fake_dst_ops in the bridge core, since this
    is required by when the bridge port is initialized. So we can safely
    modprobe/rmmod br_netfilter anytime.

    Signed-off-by: Pablo Neira Ayuso
    Acked-by: Florian Westphal

    Pablo Neira Ayuso
     

26 May, 2014

1 commit

  • Before f5efc69 ("netfilter: nf_tables: Add meta expression key for
    bridge interface name"), the entire net/bridge/netfilter/ directory
    depended on BRIDGE_NF_EBTABLES, ie. on ebtables. However, that
    directory already contained the nf_tables bridge extension that
    we should allow to compile separately. In f5efc69, we tried to
    generalize this by using CONFIG_BRIDGE_NETFILTER which was not a good
    idea since this option already existed and it is dedicated to enable
    the Netfilter bridge IP/ARP filtering.

    Let's try to fix this mess by:

    1) making net/bridge/netfilter/ dependent on the toplevel
    CONFIG_NETFILTER option, just like we do with the net/netfilter and
    net/ipv{4,6}/netfilter/ directories.

    2) Changing 'selects' to 'depends on' NETFILTER_XTABLES for
    BRIDGE_NF_EBTABLES. I believe this problem was already before
    f5efc69:

    warning: (BRIDGE_NF_EBTABLES) selects NETFILTER_XTABLES which has
    unmet direct dependencies (NET && INET && NETFILTER)

    3) Fix ebtables/nf_tables bridge dependencies by making NF_TABLES_BRIDGE
    and BRIDGE_NF_EBTABLES dependent on BRIDGE and NETFILTER:

    warning: (NF_TABLES_BRIDGE && BRIDGE_NF_EBTABLES) selects
    BRIDGE_NETFILTER which has unmet direct dependencies (NET && BRIDGE &&
    NETFILTER && INET && NETFILTER_ADVANCED)

    net/built-in.o: In function `br_parse_ip_options':
    br_netfilter.c:(.text+0x4a5ba): undefined reference to `ip_options_compile'
    br_netfilter.c:(.text+0x4a5ed): undefined reference to `ip_options_rcv_srr'
    net/built-in.o: In function `br_nf_pre_routing_finish':
    br_netfilter.c:(.text+0x4a8a4): undefined reference to `ip_route_input_noref'
    br_netfilter.c:(.text+0x4a987): undefined reference to `ip_route_output_flow'
    make: *** [vmlinux] Error 1

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

    Pablo Neira
     

23 May, 2014

1 commit


24 Apr, 2014

1 commit


14 Feb, 2013

1 commit

  • Adds an optional infrustructure component to bridge that would allow
    native vlan filtering in the bridge. Each bridge port (as well
    as the bridge device) now get a VLAN bitmap. Each bit in the bitmap
    is associated with a vlan id. This way if the bit corresponding to
    the vid is set in the bitmap that the packet with vid is allowed to
    enter and exit the port.

    Write access the bitmap is protected by RTNL and read access
    protected by RCU.

    Vlan functionality is disabled by default.

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

    Vlad Yasevich
     

08 Dec, 2012

1 commit

  • V5: fix two bugs pointed out by Thomas
    remove seq check for now, mark it as TODO

    V4: remove some useless #include
    some coding style fix

    V3: drop debugging printk's
    update selinux perm table as well

    V2: drop patch 1/2, export ifindex directly
    Redesign netlink attributes
    Improve netlink seq check
    Handle IPv6 addr as well

    This patch exports bridge multicast database via netlink
    message type RTM_GETMDB. Similar to fdb, but currently bridge-specific.
    We may need to support modify multicast database too (RTM_{ADD,DEL}MDB).

    (Thanks to Thomas for patient reviews)

    Cc: Herbert Xu
    Cc: Stephen Hemminger
    Cc: "David S. Miller"
    Cc: Thomas Graf
    Cc: Jesper Dangaard Brouer
    Signed-off-by: Cong Wang
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Cong Wang
     

28 Feb, 2010

1 commit

  • This patch adds the core functionality of IGMP snooping support
    without actually hooking it up. So this patch should be a no-op
    as far as the bridge's external behaviour is concerned.

    All the new code and data is controlled by the Kconfig option
    BRIDGE_IGMP_SNOOPING. A run-time toggle is also available.

    The multicast switching is done using an hash table that is
    lockless on the read-side through RCU. On the write-side the
    new multicast_lock is used for all operations. The hash table
    supports dynamic growth/rehashing.

    The hash table will be rehashed if any chain length exceeds a
    preset limit. If rehashing does not reduce the maximum chain
    length then snooping will be disabled.

    These features may be added in future (in no particular order):

    * IGMPv3 source support
    * Non-querier router detection
    * IPv6

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

    Herbert Xu
     

18 Jun, 2006

1 commit

  • Add basic netlink support to the Ethernet bridge. Including:
    * dump interfaces in bridges
    * monitor link status changes
    * change state of bridge port

    For some demo programs see:
    http://developer.osdl.org/shemminger/prototypes/brnl.tar.gz

    These are to allow building a daemon that does alternative
    implementations of Spanning Tree Protocol.

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

    Stephen Hemminger
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds