Abstract out the location of an m_tag's data by adding a m_tag_data() inline.
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 17 Jun 2005 19:12:23 +0000 (19:12 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 17 Jun 2005 19:12:23 +0000 (19:12 +0000)
commitd031aa80fc5dd8b2693bce1bff3116368d99666d
tree11bd54416f705e34e8df766701b6316f67ee04e5
parent6b1d6bed8294458cb04c7e8a93ff3c990c271ab1
Abstract out the location of an m_tag's data by adding a m_tag_data() inline.
Replace all instances of 'mtag + 1' with the new inline.

Fix numerous bugs, mainly in ipfw/ipfw2, where the m_tag data was being stored
in the wrong place and corrupting the m_tag, resulting in a panic.  This
primarily occured with the use of divert rules.

Reported-by: Ben Woolley <tautolog@gmail.com>
14 files changed:
sys/kern/uipc_mbuf2.c
sys/net/ipfw/ip_fw.c
sys/net/ipfw/ip_fw2.c
sys/netinet/ip_divert.c
sys/netinet/ip_encap.c
sys/netinet/ip_input.c
sys/netinet/ip_output.c
sys/netinet6/ip6_input.c
sys/netinet6/ipsec.c
sys/netproto/ipsec/ipsec_input.c
sys/netproto/ipsec/ipsec_output.c
sys/netproto/ipsec/xform_ah.c
sys/netproto/ipsec/xform_esp.c
sys/sys/mbuf.h