diff options
author | delphij <delphij@FreeBSD.org> | 2013-06-17 19:31:03 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2013-06-17 19:31:03 +0000 |
commit | d5f66cc8894f1d09d05ccb14df4bf2d0e7152603 (patch) | |
tree | fdf992feedb8ea17b23bc5c4ea60a01c38445f8b /sys/net | |
parent | 7e1479c35f8619691d2cfae3f32f957848a3b692 (diff) | |
download | FreeBSD-src-d5f66cc8894f1d09d05ccb14df4bf2d0e7152603.zip FreeBSD-src-d5f66cc8894f1d09d05ccb14df4bf2d0e7152603.tar.gz |
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
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_lagg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 8432527..11273b2 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -1608,7 +1608,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 */ @@ -1656,7 +1656,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 */ @@ -1785,7 +1785,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 */ |