svn commit: r214112 - in stable/7: share/man/man4 sys/net

Xin LI delphij at
Wed Oct 20 17:58:13 UTC 2010

Author: delphij
Date: Wed Oct 20 17:58:12 2010
New Revision: 214112

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

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
@@ -73,11 +73,19 @@ The interface link state is used to vali
 .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.
+By default, received traffic is only accepted when they are received
+through the active port.
+This constraint can be relaxed by setting the
+.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 netmask
+(Note the mac address of the wireless device is forced to match the wired
+device as a workaround.)
 .Xr ng_fec 4 ,
 .Xr ng_one2many 4 ,
+.Xr sysctl 8 ,
 .Xr ifconfig 8
@@ -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.
-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 {
+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);

More information about the svn-src-stable-7 mailing list