diff options
author | ru <ru@FreeBSD.org> | 2003-11-17 19:13:01 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2003-11-17 19:13:01 +0000 |
commit | 6e59ab8e669a9ab3c5f5ed86d22c0d6365652536 (patch) | |
tree | f01834538e11ee6539f65405480f7a4d2b0d059f /sys/netgraph/ng_eiface.c | |
parent | c99017ddccf4fb44a603dd4d8e3ed1c93b67fd70 (diff) | |
download | FreeBSD-src-6e59ab8e669a9ab3c5f5ed86d22c0d6365652536.zip FreeBSD-src-6e59ab8e669a9ab3c5f5ed86d22c0d6365652536.tar.gz |
Check the correct set of interface flags and fix a memory leak.
Reviewed by: harti
Diffstat (limited to 'sys/netgraph/ng_eiface.c')
-rw-r--r-- | sys/netgraph/ng_eiface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netgraph/ng_eiface.c b/sys/netgraph/ng_eiface.c index 460f8da..10862f4 100644 --- a/sys/netgraph/ng_eiface.c +++ b/sys/netgraph/ng_eiface.c @@ -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); } |