summaryrefslogtreecommitdiffstats
path: root/sys/net/if_lagg.c
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2010-09-01 16:53:38 +0000
committeremaste <emaste@FreeBSD.org>2010-09-01 16:53:38 +0000
commita9a1b47f1de2037a1e25bf798a3f31c507442e74 (patch)
tree0b1b1c2e8702e73089a340d59499e9ea10bca153 /sys/net/if_lagg.c
parent4d30a13146156ec27ba9e296f9f70c7f5ae4e290 (diff)
downloadFreeBSD-src-a9a1b47f1de2037a1e25bf798a3f31c507442e74.zip
FreeBSD-src-a9a1b47f1de2037a1e25bf798a3f31c507442e74.tar.gz
Add a sysctl knob to accept input packets on any link in a failover lagg.
Diffstat (limited to 'sys/net/if_lagg.c')
-rw-r--r--sys/net/if_lagg.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c
index cb14601..8911cee 100644
--- a/sys/net/if_lagg.c
+++ b/sys/net/if_lagg.c
@@ -162,6 +162,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)
{
@@ -1560,7 +1568,7 @@ lagg_fail_input(struct lagg_softc *sc, struct lagg_port *lp, struct mbuf *m)
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);
}
OpenPOWER on IntegriCloud