1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Plug mbuf leak, that I have introduced in 1.85. Also restore important comment

from if_ethersubr.c:1.178. While here adjust formatting, to make code more
readable.

Reported by:	Alexey Kamyshev, rwatson
This commit is contained in:
Gleb Smirnoff 2005-05-26 06:50:00 +00:00
parent 945a92c6be
commit 748741c7ae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146635

View File

@ -864,24 +864,32 @@ bridge_in(struct ifnet *ifp, struct mbuf *m)
case (uintptr_t)BDG_DROP:
m_freem(m);
return (NULL);
case (uintptr_t)BDG_LOCAL:
return (m);
case (uintptr_t)BDG_BCAST:
case (uintptr_t)BDG_MCAST:
m = bdg_forward(m, dst);
#ifdef DIAGNOSTIC /* glebius: am I right here? */
if (m == NULL) {
#ifdef DIAGNOSTIC
if (m == NULL)
if_printf(ifp, "bridge dropped %s packet\n",
dst == BDG_BCAST ? "broadcast" : "multicast");
return (NULL);
}
#endif
return (m);
default:
m = bdg_forward(m, dst);
/*
* But in some cases the bridge may return the
* packet for us to free; sigh.
*/
if (m != NULL)
m_freem(m);
}
return (NULL); /* not reached */
return (NULL);
}
/*