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
This commit is contained in:
parent
73adaf3810
commit
eda6cf02b8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=251859
@ -1608,7 +1608,7 @@ lagg_rr_start(struct lagg_softc *sc, struct mbuf *m)
|
|||||||
*/
|
*/
|
||||||
if ((lp = lagg_link_active(sc, lp)) == NULL) {
|
if ((lp = lagg_link_active(sc, lp)) == NULL) {
|
||||||
m_freem(m);
|
m_freem(m);
|
||||||
return (ENOENT);
|
return (ENETDOWN);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send mbuf */
|
/* 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 */
|
/* Use the master port if active or the next available port */
|
||||||
if ((lp = lagg_link_active(sc, sc->sc_primary)) == NULL) {
|
if ((lp = lagg_link_active(sc, sc->sc_primary)) == NULL) {
|
||||||
m_freem(m);
|
m_freem(m);
|
||||||
return (ENOENT);
|
return (ENETDOWN);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send mbuf */
|
/* Send mbuf */
|
||||||
@ -1785,7 +1785,7 @@ lagg_lb_start(struct lagg_softc *sc, struct mbuf *m)
|
|||||||
*/
|
*/
|
||||||
if ((lp = lagg_link_active(sc, lp)) == NULL) {
|
if ((lp = lagg_link_active(sc, lp)) == NULL) {
|
||||||
m_freem(m);
|
m_freem(m);
|
||||||
return (ENOENT);
|
return (ENETDOWN);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send mbuf */
|
/* Send mbuf */
|
||||||
|
Loading…
Reference in New Issue
Block a user