-/* $OpenBSD: if.c,v 1.383 2015/10/05 15:39:01 uebayasi Exp $ */
+/* $OpenBSD: if.c,v 1.384 2015/10/05 15:57:27 uebayasi Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
*/
IFQ_ENQUEUE(&ifp->if_snd, m, NULL, error);
if (error) {
+ IF_DROP(&ifp->if_snd);
splx(s);
return (error);
}
-/* $OpenBSD: if_ppp.c,v 1.87 2015/07/15 22:16:41 deraadt Exp $ */
+/* $OpenBSD: if_ppp.c,v 1.88 2015/10/05 15:57:27 uebayasi Exp $ */
/* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */
/*
IF_ENQUEUE(ifq, m0);
error = 0;
}
- } else
+ } else {
IFQ_ENQUEUE(&sc->sc_if.if_snd, m0, NULL, error);
+ if (error)
+ IF_DROP(&sc->sc_if.if_snd);
+ }
if (error) {
splx(s);
- sc->sc_if.if_oerrors++;
sc->sc_stats.ppp_oerrors++;
return (error);
}
IF_ENQUEUE(ifq, m);
error = 0;
}
- } else
+ } else {
IFQ_ENQUEUE(&sc->sc_if.if_snd, m, NULL, error);
+ if (error)
+ IF_DROP(&sc->sc_if.if_snd);
+ }
if (error) {
- sc->sc_if.if_oerrors++;
sc->sc_stats.ppp_oerrors++;
}
break;
-/* $OpenBSD: ieee80211_pae_output.c,v 1.21 2015/09/16 20:24:12 stsp Exp $ */
+/* $OpenBSD: ieee80211_pae_output.c,v 1.22 2015/10/05 15:57:27 uebayasi Exp $ */
/*-
* Copyright (c) 2007,2008 Damien Bergamini <damien.bergamini@free.fr>
ifp->if_obytes += len;
if ((ifp->if_flags & IFF_OACTIVE) == 0)
(*ifp->if_start)(ifp);
- }
+ } else
+ IF_DROP(&ifp->if_snd);
splx(s);
return error;