diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2003-08-29 19:12:18 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2003-08-29 19:12:18 +0000 |
| commit | 2166ffe8e1c20605b899c90b1de75fa5baca4396 (patch) | |
| tree | 9187272707f38de3c86f55daf69a0d09a465f209 | |
| parent | 88fced4cb30116198a675f93943f16a12a5b09ae (diff) | |
Notes
| -rw-r--r-- | sys/net/if_ethersubr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 2a5de54797fdb..9624e11f931d9 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -212,6 +212,8 @@ ether_output(ifp, m, dst, rt0) struct llc llc; M_PREPEND(m, LLC_SNAPFRAMELEN, M_TRYWAIT); + if (m == NULL) + senderr(ENOBUFS); llc.llc_dsap = llc.llc_ssap = LLC_SNAP_LSAP; llc.llc_control = LLC_UI; bcopy(at_org_code, llc.llc_snap_org_code, sizeof(at_org_code)); @@ -249,7 +251,7 @@ ether_output(ifp, m, dst, rt0) * allocate another. */ M_PREPEND(m, ETHER_HDR_LEN, M_DONTWAIT); - if (m == 0) + if (m == NULL) senderr(ENOBUFS); eh = mtod(m, struct ether_header *); (void)memcpy(&eh->ether_type, &type, |
