1. 13 5月, 2015 2 次提交
  2. 06 5月, 2015 2 次提交
    • A
      ebtables: Use eth_proto_is_802_3 · 27cf6a6e
      Alexander Duyck 提交于
      Replace "ntohs(proto) >= ETH_P_802_3_MIN" w/ eth_proto_is_802_3(proto).
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      27cf6a6e
    • B
      bridge: change BR_GROUPFWD_RESTRICTED to allow forwarding of LLDP frames · 784b58a3
      Bernhard Thaler 提交于
      BR_GROUPFWD_RESTRICTED bitmask restricts users from setting values to
      /sys/class/net/brX/bridge/group_fwd_mask that allow forwarding of
      some IEEE 802.1D Table 7-10 Reserved addresses:
      
      	(MAC Control) 802.3		01-80-C2-00-00-01
      	(Link Aggregation) 802.3	01-80-C2-00-00-02
      	802.1AB LLDP			01-80-C2-00-00-0E
      
      Change BR_GROUPFWD_RESTRICTED to allow to forward LLDP frames and document
      group_fwd_mask.
      
      e.g.
         echo 16384 > /sys/class/net/brX/bridge/group_fwd_mask
      allows to forward LLDP frames.
      
      This may be needed for bridge setups used for network troubleshooting or
      any other scenario where forwarding of LLDP frames is desired (e.g. bridge
      connecting a virtual machine to real switch transmitting LLDP frames that
      virtual machine needs to receive).
      
      Tested on a simple bridge setup with two interfaces and host transmitting
      LLDP frames on one side of this bridge (used lldpd). Setting group_fwd_mask
      as described above lets LLDP frames traverse bridge.
      Signed-off-by: NBernhard Thaler <bernhard.thaler@wvnet.at>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      784b58a3
  3. 05 5月, 2015 2 次提交
  4. 30 4月, 2015 2 次提交
    • N
      bridge/nl: remove wrong use of NLM_F_MULTI · 46c264da
      Nicolas Dichtel 提交于
      NLM_F_MULTI must be used only when a NLMSG_DONE message is sent. In fact,
      it is sent only at the end of a dump.
      
      Libraries like libnl will wait forever for NLMSG_DONE.
      
      Fixes: e5a55a89 ("net: create generic bridge ops")
      Fixes: 815cccbf ("ixgbe: add setlink, getlink support to ixgbe and ixgbevf")
      CC: John Fastabend <john.r.fastabend@intel.com>
      CC: Sathya Perla <sathya.perla@emulex.com>
      CC: Subbu Seetharaman <subbu.seetharaman@emulex.com>
      CC: Ajit Khaparde <ajit.khaparde@emulex.com>
      CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      CC: intel-wired-lan@lists.osuosl.org
      CC: Jiri Pirko <jiri@resnulli.us>
      CC: Scott Feldman <sfeldma@gmail.com>
      CC: Stephen Hemminger <stephen@networkplumber.org>
      CC: bridge@lists.linux-foundation.org
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46c264da
    • N
      bridge/mdb: remove wrong use of NLM_F_MULTI · 82199679
      Nicolas Dichtel 提交于
      NLM_F_MULTI must be used only when a NLMSG_DONE message is sent. In fact,
      it is sent only at the end of a dump.
      
      Libraries like libnl will wait forever for NLMSG_DONE.
      
      Fixes: 37a393bc ("bridge: notify mdb changes via netlink")
      CC: Cong Wang <amwang@redhat.com>
      CC: Stephen Hemminger <stephen@networkplumber.org>
      CC: bridge@lists.linux-foundation.org
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      82199679
  5. 13 4月, 2015 7 次提交
  6. 09 4月, 2015 1 次提交
  7. 08 4月, 2015 5 次提交
    • F
      netfilter: bridge: make BRNF_PKT_TYPE flag a bool · a1e67951
      Florian Westphal 提交于
      nf_bridge_info->mask is used for several things, for example to
      remember if skb->pkt_type was set to OTHER_HOST.
      
      For a bridge, OTHER_HOST is expected case. For ip forward its a non-starter
      though -- routing expects PACKET_HOST.
      
      Bridge netfilter thus changes OTHER_HOST to PACKET_HOST before hook
      invocation and then un-does it after hook traversal.
      
      This information is irrelevant outside of br_netfilter.
      
      After this change, ->mask now only contains flags that need to be
      known outside of br_netfilter in fast-path.
      
      Future patch changes mask into a 2bit state field in sk_buff, so that
      we can remove skb->nf_bridge pointer for good and consider all remaining
      places that access nf_bridge info content a not-so fastpath.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      a1e67951
    • F
      netfilter: bridge: start splitting mask into public/private chunks · 3eaf4025
      Florian Westphal 提交于
      ->mask is a bit info field that mixes various use cases.
      
      In particular, we have flags that are mutually exlusive, and flags that
      are only used within br_netfilter while others need to be exposed to
      other parts of the kernel.
      
      Remove BRNF_8021Q/PPPoE flags.  They're mutually exclusive and only
      needed within br_netfilter context.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      3eaf4025
    • F
      netfilter: bridge: add and use nf_bridge_info_get helper · 38330783
      Florian Westphal 提交于
      Don't access skb->nf_bridge directly, this pointer will be removed soon.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      38330783
    • F
      netfilter: bridge: don't use nf_bridge_info data to store mac header · e70deecb
      Florian Westphal 提交于
      br_netfilter maintains an extra state, nf_bridge_info, which is attached
      to skb via skb->nf_bridge pointer.
      
      Amongst other things we use skb->nf_bridge->data to store the original
      mac header for every processed skb.
      
      This is required for ip refragmentation when using conntrack
      on top of bridge, because ip_fragment doesn't copy it from original skb.
      
      However there is no need anymore to do this unconditionally.
      
      Move this to the one place where its needed -- when br_netfilter calls
      ip_fragment().
      
      Also switch to percpu storage for this so we can handle fragmenting
      without accessing nf_bridge meta data.
      
      Only user left is neigh resolution when DNAT is detected, to hold
      the original source mac address (neigh resolution builds new mac header
      using bridge mac), so rename ->data and reduce its size to whats needed.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      e70deecb
    • D
      netfilter: Pass socket pointer down through okfn(). · 7026b1dd
      David Miller 提交于
      On the output paths in particular, we have to sometimes deal with two
      socket contexts.  First, and usually skb->sk, is the local socket that
      generated the frame.
      
      And second, is potentially the socket used to control a tunneling
      socket, such as one the encapsulates using UDP.
      
      We do not want to disassociate skb->sk when encapsulating in order
      to fix this, because that would break socket memory accounting.
      
      The most extreme case where this can cause huge problems is an
      AF_PACKET socket transmitting over a vxlan device.  We hit code
      paths doing checks that assume they are dealing with an ipv4
      socket, but are actually operating upon the AF_PACKET one.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7026b1dd
  8. 05 4月, 2015 2 次提交
  9. 03 4月, 2015 1 次提交
  10. 02 4月, 2015 1 次提交
  11. 23 3月, 2015 1 次提交
  12. 19 3月, 2015 1 次提交
  13. 16 3月, 2015 2 次提交
  14. 15 3月, 2015 1 次提交
  15. 10 3月, 2015 4 次提交
  16. 09 3月, 2015 3 次提交
  17. 06 3月, 2015 1 次提交
    • J
      bridge: Extend Proxy ARP design to allow optional rules for Wi-Fi · 842a9ae0
      Jouni Malinen 提交于
      This extends the design in commit 95850116 ("bridge: Add support for
      IEEE 802.11 Proxy ARP") with optional set of rules that are needed to
      meet the IEEE 802.11 and Hotspot 2.0 requirements for ProxyARP. The
      previously added BR_PROXYARP behavior is left as-is and a new
      BR_PROXYARP_WIFI alternative is added so that this behavior can be
      configured from user space when required.
      
      In addition, this enables proxyarp functionality for unicast ARP
      requests for both BR_PROXYARP and BR_PROXYARP_WIFI since it is possible
      to use unicast as well as broadcast for these frames.
      
      The key differences in functionality:
      
      BR_PROXYARP:
      - uses the flag on the bridge port on which the request frame was
        received to determine whether to reply
      - block bridge port flooding completely on ports that enable proxy ARP
      
      BR_PROXYARP_WIFI:
      - uses the flag on the bridge port to which the target device of the
        request belongs
      - block bridge port flooding selectively based on whether the proxyarp
        functionality replied
      Signed-off-by: NJouni Malinen <jouni@codeaurora.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      842a9ae0
  18. 04 3月, 2015 2 次提交