Fix a bug introduced by revision 1.59 that would cause an immediate

NULL dereference if a bridged packet was rejected by ipfw.
This commit is contained in:
Ian Dowse 2002-12-27 16:27:45 +00:00
parent 8da5b3e292
commit bf235b1710
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108319

View File

@ -799,11 +799,11 @@ static struct mbuf *
bdg_forward(struct mbuf *m0, struct ifnet *dst)
{
#define EH_RESTORE(_m) do { \
M_PREPEND((_m), ETHER_HDR_LEN, M_DONTWAIT); \
if ((_m) == NULL) { \
bdg_dropped++; \
return NULL; \
} \
M_PREPEND((_m), ETHER_HDR_LEN, M_DONTWAIT); \
if (eh != mtod((_m), struct ether_header *)) \
bcopy(&save_eh, mtod((_m), struct ether_header *), ETHER_HDR_LEN); \
else \