Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Oct 2010 17:58:12 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r214112 - in stable/7: share/man/man4 sys/net
Message-ID:  <201010201758.o9KHwCqk064692@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Wed Oct 20 17:58:12 2010
New Revision: 214112
URL: http://svn.freebsd.org/changeset/base/214112

Log:
  MFC r190527,190528,190531:
  
  190527(sam):
  fix wired-wireless failover example and remove incorrect
  comment about WPA not working
  
  190528(sam):
  remove bogus nwid use; that's a compat shim for netbsd
  
  190531(bruffer):
  Fix typo.
  
  MFC r212100 (emaste),213632,214066:
  
  Add a new syslog knob, net.link.lagg.failover_rx_all, to control
  whether to accept input packets on any link in a failover lagg,
  and add the corresponding documentation.

Modified:
  stable/7/share/man/man4/lagg.4
  stable/7/sys/net/if_lagg.c
Directory Properties:
  stable/7/share/man/man4/   (props changed)
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/share/man/man4/lagg.4
==============================================================================
--- stable/7/share/man/man4/lagg.4	Wed Oct 20 17:42:10 2010	(r214111)
+++ stable/7/share/man/man4/lagg.4	Wed Oct 20 17:58:12 2010	(r214112)
@@ -16,7 +16,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 17, 2007
+.Dd October 18, 2010
 .Dt LAGG 4
 .Os
 .Sh NAME
@@ -73,11 +73,19 @@ The interface link state is used to vali
 not.
 .Bl -tag -width loadbalance
 .It Ic failover
-Sends and receives traffic only through the master port.
+Sends traffic only through the active port.
 If the master port becomes unavailable,
 the next active port is used.
 The first interface added is the master port;
 any interfaces added after that are used as failover devices.
+.Pp
+By default, received traffic is only accepted when they are received
+through the active port.
+This constraint can be relaxed by setting the
+.Va net.link.lagg.failover_rx_all
+.Xr sysctl 8
+variable to a nonzero value,
+which is useful for certain bridged network setups.
 .It Ic fec
 Supports Cisco EtherChannel.
 This is a static setup and does not negotiate aggregation with the peer or
@@ -142,13 +150,18 @@ Whenever the wired master interface is u
 device will be used:
 .Bd -literal -offset indent
 # ifconfig em0 up
-# ifconfig ath0 nwid my_net up
-# ifconfig lagg0 laggproto failover laggport em0 laggport ath0 \e
+# ifconfig ath0 ether 00:11:22:33:44:55
+# ifconfig create wlan0 wlandev ath0 ssid my_net up
+# ifconfig lagg0 laggproto failover laggport em0 laggport wlan0 \e
 	192.168.1.1 netmask 255.255.255.0
 .Ed
+.Pp
+(Note the mac address of the wireless device is forced to match the wired
+device as a workaround.)
 .Sh SEE ALSO
 .Xr ng_fec 4 ,
 .Xr ng_one2many 4 ,
+.Xr sysctl 8 ,
 .Xr ifconfig 8
 .Sh HISTORY
 The
@@ -172,6 +185,3 @@ There is no way to configure LACP admini
 and port priorities.
 The current implementation always performs active-mode LACP and uses 0x8000 as
 system and port priorities.
-.Pp
-WPA security does not currently work correctly with a wireless interface added
-to the lagg port.

Modified: stable/7/sys/net/if_lagg.c
==============================================================================
--- stable/7/sys/net/if_lagg.c	Wed Oct 20 17:42:10 2010	(r214111)
+++ stable/7/sys/net/if_lagg.c	Wed Oct 20 17:58:12 2010	(r214112)
@@ -159,6 +159,14 @@ static const struct {
 	{ LAGG_PROTO_NONE,		NULL }
 };
 
+SYSCTL_DECL(_net_link);
+SYSCTL_NODE(_net_link, OID_AUTO, lagg, CTLFLAG_RW, 0, "Link Aggregation");
+
+static int lagg_failover_rx_all = 0; /* Allow input on any failover links */
+SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW,
+    &lagg_failover_rx_all, 0,
+    "Accept input from any interface in a failover lagg");
+
 static int
 lagg_modevent(module_t mod, int type, void *data)
 {
@@ -1476,7 +1484,7 @@ lagg_fail_input(struct lagg_softc *sc, s
 	struct ifnet *ifp = sc->sc_ifp;
 	struct lagg_port *tmp_tp;
 
-	if (lp == sc->sc_primary) {
+	if (lp == sc->sc_primary || lagg_failover_rx_all) {
 		m->m_pkthdr.rcvif = ifp;
 		return (m);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010201758.o9KHwCqk064692>