Check the correct set of interface flags and fix a memory leak.

Reviewed by:	harti
This commit is contained in:
Ruslan Ermilov 2003-11-17 19:13:01 +00:00
parent f6dbcc4910
commit d47c9466dd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=122864

View File

@ -609,7 +609,8 @@ ng_eiface_rcvdata(hook_p hook, item_p item)
printf("ng_eiface: mbuf is null.\n");
return (EINVAL);
}
if (!(ifp->if_flags & IFF_UP)) {
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) {
NG_FREE_M(m);
return (ENETDOWN);
}