diff options
author | sam <sam@FreeBSD.org> | 2003-10-29 05:40:07 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-10-29 05:40:07 +0000 |
commit | 409cf5f514ad9056b7dac76a11c4844021c2be2b (patch) | |
tree | d88c488f67b1157ed3b937a89a30e71bdcc2bd2b /sys/netinet/ip_icmp.c | |
parent | 0e35eb160176704d52210e5e548a61a6aaa6cd84 (diff) | |
download | FreeBSD-src-409cf5f514ad9056b7dac76a11c4844021c2be2b.zip FreeBSD-src-409cf5f514ad9056b7dac76a11c4844021c2be2b.tar.gz |
Introduce the notion of "persistent mbuf tags"; these are tags that stay
with an mbuf until it is reclaimed. This is in contrast to tags that
vanish when an mbuf chain passes through an interface. Persistent tags
are used, for example, by MAC labels.
Add an m_tag_delete_nonpersistent function to strip non-persistent tags
from mbufs and use it to strip such tags from packets as they pass through
the loopback interface and when turned around by icmp. This fixes problems
with "tag leakage".
Pointed out by: Jonathan Stone
Reviewed by: Robert Watson
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r-- | sys/netinet/ip_icmp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 1e485e3..8f71b05 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -728,6 +728,7 @@ match: bcopy((caddr_t)ip + optlen, (caddr_t)(ip + 1), (unsigned)(m->m_len - sizeof(struct ip))); } + m_tag_delete_nonpersistent(m); m->m_flags &= ~(M_BCAST|M_MCAST); icmp_send(m, opts, ro); done: |