summaryrefslogtreecommitdiffstats
path: root/sys/security/mac/mac_pipe.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-04-08 14:25:47 +0000
committerdes <des@FreeBSD.org>2003-04-08 14:25:47 +0000
commit567ac2b268739a751df819d1aa68404f430151cb (patch)
treea9d6dfe9fba9afa35e60736c6acc2bb7970ecd0a /sys/security/mac/mac_pipe.c
parente105056ea61ca6ae4a0e93115e8916181e93be8b (diff)
downloadFreeBSD-src-567ac2b268739a751df819d1aa68404f430151cb.zip
FreeBSD-src-567ac2b268739a751df819d1aa68404f430151cb.tar.gz
Introduce an M_ASSERTPKTHDR() macro which performs the very common task
of asserting that an mbuf has a packet header. Use it instead of hand- rolled versions wherever applicable. Submitted by: Hiten Pandya <hiten@unixdaemons.com>
Diffstat (limited to 'sys/security/mac/mac_pipe.c')
-rw-r--r--sys/security/mac/mac_pipe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/security/mac/mac_pipe.c b/sys/security/mac/mac_pipe.c
index 17b37d8..38f7e9b 100644
--- a/sys/security/mac/mac_pipe.c
+++ b/sys/security/mac/mac_pipe.c
@@ -721,7 +721,7 @@ mac_init_mbuf(struct mbuf *m, int flag)
{
int error;
- KASSERT(m->m_flags & M_PKTHDR, ("mac_init_mbuf on non-header mbuf"));
+ M_ASSERTPKTHDR(m);
mac_init_label(&m->m_pkthdr.label);
@@ -2270,7 +2270,7 @@ mac_check_ifnet_transmit(struct ifnet *ifnet, struct mbuf *mbuf)
if (!mac_enforce_network)
return (0);
- KASSERT(mbuf->m_flags & M_PKTHDR, ("packet has no pkthdr"));
+ M_ASSERTPKTHDR(mbuf);
if (!(mbuf->m_pkthdr.label.l_flags & MAC_FLAG_INITIALIZED))
if_printf(ifnet, "not initialized\n");
OpenPOWER on IntegriCloud