diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2005-11-27 18:37:15 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2005-11-27 18:37:15 +0000 |
commit | e66f54b279fbbe99ceb90df87409998d623da896 (patch) | |
tree | 099b735bb8cbba7553d5528640f9f738685e84c7 /sys/net | |
parent | e9ec5207c8ea9ddd6cf4b86babf400e02e8a1a34 (diff) | |
download | src-e66f54b279fbbe99ceb90df87409998d623da896.tar.gz src-e66f54b279fbbe99ceb90df87409998d623da896.zip |
Add several missing calls to splx() in error cases associated with
calling ether_ipfw_chk() from the ethernet output code.
PR: 57985
Reported by: Scot Loach <sloach at sandvine dot com>
Notes
Notes:
svn path=/stable/4/; revision=152860
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_ethersubr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 917ca968ed92..28cf9a1f6f42 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -414,6 +414,7 @@ no_bridge: save_eh = *eh; m_adj(m, ETHER_HDR_LEN); if (ether_ipfw_chk(&m, ifp, &rule, eh, 0) == 0) { + splx(s); if (m) { m_freem(m); return EACCES; /* pkt dropped */ @@ -427,8 +428,10 @@ no_bridge: m->m_pkthdr.len += ETHER_HDR_LEN ; } else { M_PREPEND(m, ETHER_HDR_LEN, M_DONTWAIT); - if (m == NULL) /* nope... */ + if (m == NULL) { /* nope... */ + splx(s); return ENOBUFS; + } bcopy(&save_eh, mtod(m, struct ether_header *), ETHER_HDR_LEN); } |