From 0b7bc45525fe6f62ef40da3ef36d86fbd0109b18 Mon Sep 17 00:00:00 2001 From: delphij Date: Mon, 1 Jul 2013 22:07:01 +0000 Subject: [PATCH] MFC r251859: Return ENETDOWN instead of ENOENT when all lagg(4) links are inactive when upper layer tries to transmit packet. This gives better feedback and meaningful errors for applications. Reviewed by: thompsa git-svn-id: svn://svn.freebsd.org/base/stable/8@252490 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/net/if_lagg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 3c98c251a..aca0c77eb 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -1572,7 +1572,7 @@ lagg_rr_start(struct lagg_softc *sc, struct mbuf *m) */ if ((lp = lagg_link_active(sc, lp)) == NULL) { m_freem(m); - return (ENOENT); + return (ENETDOWN); } /* Send mbuf */ @@ -1620,7 +1620,7 @@ lagg_fail_start(struct lagg_softc *sc, struct mbuf *m) /* Use the master port if active or the next available port */ if ((lp = lagg_link_active(sc, sc->sc_primary)) == NULL) { m_freem(m); - return (ENOENT); + return (ENETDOWN); } /* Send mbuf */ @@ -1749,7 +1749,7 @@ lagg_lb_start(struct lagg_softc *sc, struct mbuf *m) */ if ((lp = lagg_link_active(sc, lp)) == NULL) { m_freem(m); - return (ENOENT); + return (ENETDOWN); } /* Send mbuf */ -- 2.45.0