diff options
author | des <des@FreeBSD.org> | 2003-04-08 14:25:47 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-04-08 14:25:47 +0000 |
commit | 567ac2b268739a751df819d1aa68404f430151cb (patch) | |
tree | a9d6dfe9fba9afa35e60736c6acc2bb7970ecd0a /sys/netinet/ip_divert.c | |
parent | e105056ea61ca6ae4a0e93115e8916181e93be8b (diff) | |
download | FreeBSD-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/netinet/ip_divert.c')
-rw-r--r-- | sys/netinet/ip_divert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 162d7f7..d10ed97 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -180,7 +180,7 @@ divert_packet(struct mbuf *m, int incoming, int port, int rule) struct ifaddr *ifa; /* Sanity check */ - KASSERT((m->m_flags & M_PKTHDR), ("%s: !PKTHDR", __func__)); + M_ASSERTPKTHDR(m); /* Find IP address for receive interface */ TAILQ_FOREACH(ifa, &m->m_pkthdr.rcvif->if_addrhead, ifa_link) { |