Skip to content
  1. May 06, 2015
    • Bernhard Thaler's avatar
      bridge: change BR_GROUPFWD_RESTRICTED to allow forwarding of LLDP frames · 784b58a3
      Bernhard Thaler authored
      
      
      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: default avatarBernhard Thaler <bernhard.thaler@wvnet.at>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      784b58a3
    • Eric Dumazet's avatar
      tcp: provide SYN headers for passive connections · cd8ae852
      Eric Dumazet authored
      
      
      This patch allows a server application to get the TCP SYN headers for
      its passive connections.  This is useful if the server is doing
      fingerprinting of clients based on SYN packet contents.
      
      Two socket options are added: TCP_SAVE_SYN and TCP_SAVED_SYN.
      
      The first is used on a socket to enable saving the SYN headers
      for child connections. This can be set before or after the listen()
      call.
      
      The latter is used to retrieve the SYN headers for passive connections,
      if the parent listener has enabled TCP_SAVE_SYN.
      
      TCP_SAVED_SYN is read once, it frees the saved SYN headers.
      
      The data returned in TCP_SAVED_SYN are network (IPv4/IPv6) and TCP
      headers.
      
      Original patch was written by Tom Herbert, I changed it to not hold
      a full skb (and associated dst and conntracking reference).
      
      We have used such patch for about 3 years at Google.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Tested-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd8ae852
  2. May 05, 2015
    • Linus Lüssing's avatar
      net: fix two sparse warnings introduced by IGMP/MLD parsing exports · fcba67c9
      Linus Lüssing authored
      > net/core/skbuff.c:4108:13: sparse: incorrect type in assignment (different base types)
      > net/ipv6/mcast_snoop.c:63 ipv6_mc_check_exthdrs() warn: unsigned 'offset' is never less than zero.
      
      Introduced by 9afd85c9
      
      
      ("net: Export IGMP/MLD message validation code")
      
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fcba67c9
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · f9161585
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2015-05-04
      
      This series contains updates to igb, e100, e1000e and ixgbe.
      
      Todd cleans up igb_enable_mas() since it should only be called for the
      82575 silicon and has no clear return, so modify the function to void.
      
      Jean Sacren found upon inspection that 'err' did not need to be
      initialized, since it is immediately overwritten.
      
      Alex Duyck provides two patches for e1000e, the first cleans up the
      handling VLAN_HLEN as a part of max frame size.  Fixes the issue:
      c751a3d5
      
       ("e1000e: Correctly include VLAN_HLEN when changing
      interface MTU").  The second fixes an issue where the driver was not
      allowing jumbo frames to be enabled when CRC stripping was disabled,
      however it was allowing CRC stripping to be disabled while jumbo frames
      were enabled.
      
      Jeff (me) fixes a warning found on PPC where the use of do_div() needed
      to use u64 arg and not s64.
      
      Mark provides three ixgbe patches, first to fix the Intel On-chip System
      Fabric (IOSF) Sideband message interfaces, to serialize access using both
      PHY bits in the SWFW_SEMAPHORE register.  Then fixes how semaphore bits
      were released, since they should be released in reverse of the order that
      they were taken.  Lastly updates ixgbe to use a signed type to hold
      error codes, since error codes are negative, so consistently use signed
      types when handling them.
      
      v2: dropped the previous #6-#8 patches by Hiroshi Shimanoto based on
          feedback from Or Gerlitz (and David Miller) that it appears there
          needs to be further discussion on how this gets implemented.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f9161585
    • David S. Miller's avatar
      Merge branch 'tipc-topology-cleanup' · c373dac5
      David S. Miller authored
      
      
      Ying Xue says:
      
      ====================
      tipc: cleanup topology server
      
      Not only function names declared in subscr.c are very confused, but
      also topology server's locking policy is not designed very well, for
      instance, usually leading to panic in some special corner cases.
      
      In this series, we attempt to eliminate the confusion of function names
      and simplify topology server's locking policy to solve above mentioned
      issues. More importantly, the change will make relevant code easily
      understandable and maintainable.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c373dac5
    • Ying Xue's avatar
      tipc: deal with return value of tipc_conn_new callback · 90bdfcb7
      Ying Xue authored
      
      
      Once tipc_conn_new() returns NULL, the connection should be shut
      down immediately, otherwise, oops may happen due to the NULL pointer.
      
      Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
      Reviewed-by: default avatarJon Maloy <jon.maloy@ericson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90bdfcb7
    • Ying Xue's avatar
      tipc: adjust locking policy of subscription · a13683f2
      Ying Xue authored
      
      
      Currently subscriber's lock protects not only subscriber's subscription
      list but also all subscriptions linked into the list. However, as all
      members of subscription are never changed after they are initialized,
      it's unnecessary for subscription to be protected under subscriber's
      lock. If the lock is used to only protect subscriber's subscription
      list, the adjustment not only makes the locking policy simpler, but
      also helps to avoid a deadlock which may happen once creating a
      subscription is failed.
      
      Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
      Reviewed-by: default avatarJon Maloy <jon.maloy@ericson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a13683f2
    • Ying Xue's avatar
      tipc: involve reference counter for subscriber · 00bc00a9
      Ying Xue authored
      
      
      At present subscriber's lock is used to protect the subscription list
      of subscriber as well as subscriptions linked into the list. While one
      or all subscriptions are deleted through iterating the list, the
      subscriber's lock must be held. Meanwhile, as deletion of subscription
      may happen in subscription timer's handler, the lock must be grabbed
      in the function as well. When subscription's timer is terminated with
      del_timer_sync() during above iteration, subscriber's lock has to be
      temporarily released, otherwise, deadlock may occur. However, the
      temporary release may cause the double free of a subscription as the
      subscription is not disconnected from the subscription list.
      
      Now if a reference counter is introduced to subscriber, subscription's
      timer can be asynchronously stopped with del_timer(). As a result, the
      issue is not only able to be fixed, but also relevant code is pretty
      readable and understandable.
      
      Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
      Reviewed-by: default avatarJon Maloy <jon.maloy@ericson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      00bc00a9
    • Ying Xue's avatar
      tipc: introduce tipc_subscrb_create routine · 1b764828
      Ying Xue authored
      
      
      Introducing a new function makes the purpose of tipc_subscrb_connect_cb
      callback routine more clear.
      
      Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
      Reviewed-by: default avatarJon Maloy <jon.maloy@ericson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1b764828
    • Ying Xue's avatar
      tipc: rename functions defined in subscr.c · 57f1d186
      Ying Xue authored
      
      
      When a topology server accepts a connection request from its client,
      it allocates a connection instance and a tipc_subscriber structure
      object. The former is used to communicate with client, and the latter
      is often treated as a subscriber which manages all subscription events
      requested from a same client. When a topology server receives a request
      of subscribing name services from a client through the connection, it
      creates a tipc_subscription structure instance which is seen as a
      subscription recording what name services are subscribed. In order to
      manage all subscriptions from a same client, topology server links
      them into the subscrp_list of the subscriber. So subscriber and
      subscription completely represents different meanings respectively,
      but function names associated with them make us so confused that we
      are unable to easily tell which function is against subscriber and
      which is to subscription. So we want to eliminate the confusion by
      renaming them.
      
      Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
      Reviewed-by: default avatarJon Maloy <jon.maloy@ericson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      57f1d186
    • David S. Miller's avatar
      Merge branch 'igmp_mld_export' · 29a1ff65
      David S. Miller authored
      
      
      Linus Lüssing says:
      
      ====================
      Exporting IGMP/MLD checking from bridge code
      
      The multicast optimizations in batman-adv are yet only usable and
      enabled in non-bridged scenarios. To be able to support bridged setups
      batman-adv needs to be able to detect IGMP/MLD queriers and reports on
      mesh nodes without bridges, too. See the following link for details:
      
      http://www.open-mesh.org/projects/batman-adv/wiki/Multicast-optimizations-listener-reports
      
      To avoid duplicate code between the bridge and batman-adv, the IGMP/MLD
      message validation code is moved from the bridge to the IPv4/IPv6 stack.
      
      On the way, some refactoring to increase readability and to iron out
      some subtle differences between the IGMP and MLD parsing code is done.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      29a1ff65
    • Linus Lüssing's avatar
      net: Export IGMP/MLD message validation code · 9afd85c9
      Linus Lüssing authored
      
      
      With this patch, the IGMP and MLD message validation functions are moved
      from the bridge code to IPv4/IPv6 multicast files. Some small
      refactoring was done to enhance readibility and to iron out some
      differences in behaviour between the IGMP and MLD parsing code (e.g. the
      skb-cloning of MLD messages is now only done if necessary, just like the
      IGMP part always did).
      
      Finally, these IGMP and MLD message validation functions are exported so
      that not only the bridge can use it but batman-adv later, too.
      
      Signed-off-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9afd85c9
    • Linus Lüssing's avatar
      bridge: multicast: call skb_checksum_{simple_, }validate · 3c9e4f87
      Linus Lüssing authored
      
      
      Let's use these new, neat helpers.
      
      Signed-off-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
      Acked-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3c9e4f87
    • Jamal Hadi Salim's avatar
      tc: remove unused redirect ttl · c19ae86a
      Jamal Hadi Salim authored
      
      
      improves ingress+u32 performance from 22.4 Mpps to 22.9 Mpps
      
      Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      Acked-by: default avatarFlorian Westphal <fw@strlen.de>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c19ae86a
  3. May 04, 2015