svn commit: r251859 - head/sys/net
Xin LI
delphij at FreeBSD.org
Mon Jun 17 19:31:04 UTC 2013
Author: delphij
Date: Mon Jun 17 19:31:03 2013
New Revision: 251859
URL: http://svnweb.freebsd.org/changeset/base/251859
Log:
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.
MFC after: 2 weeks
Reviewed by: thompsa
Modified:
head/sys/net/if_lagg.c
Modified: head/sys/net/if_lagg.c
==============================================================================
--- head/sys/net/if_lagg.c Mon Jun 17 18:34:34 2013 (r251858)
+++ head/sys/net/if_lagg.c Mon Jun 17 19:31:03 2013 (r251859)
@@ -1608,7 +1608,7 @@ lagg_rr_start(struct lagg_softc *sc, str
*/
if ((lp = lagg_link_active(sc, lp)) == NULL) {
m_freem(m);
- return (ENOENT);
+ return (ENETDOWN);
}
/* Send mbuf */
@@ -1656,7 +1656,7 @@ lagg_fail_start(struct lagg_softc *sc, s
/* 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 */
@@ -1785,7 +1785,7 @@ lagg_lb_start(struct lagg_softc *sc, str
*/
if ((lp = lagg_link_active(sc, lp)) == NULL) {
m_freem(m);
- return (ENOENT);
+ return (ENETDOWN);
}
/* Send mbuf */
More information about the svn-src-all
mailing list