diff options
author | emaste <emaste@FreeBSD.org> | 2010-09-01 16:53:38 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2010-09-01 16:53:38 +0000 |
commit | a9a1b47f1de2037a1e25bf798a3f31c507442e74 (patch) | |
tree | 0b1b1c2e8702e73089a340d59499e9ea10bca153 /sys/net | |
parent | 4d30a13146156ec27ba9e296f9f70c7f5ae4e290 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/net/if_lagg.c | 10 |
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); } |