summaryrefslogtreecommitdiffstats
path: root/sys/net/if_loop.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-10-29 05:40:07 +0000
committersam <sam@FreeBSD.org>2003-10-29 05:40:07 +0000
commit409cf5f514ad9056b7dac76a11c4844021c2be2b (patch)
treed88c488f67b1157ed3b937a89a30e71bdcc2bd2b /sys/net/if_loop.c
parent0e35eb160176704d52210e5e548a61a6aaa6cd84 (diff)
downloadFreeBSD-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/net/if_loop.c')
-rw-r--r--sys/net/if_loop.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index 265c830..21b87e5 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -266,6 +266,7 @@ if_simloop(ifp, m, af, hlen)
int isr;
M_ASSERTPKTHDR(m);
+ m_tag_delete_nonpersistent(m);
m->m_pkthdr.rcvif = ifp;
/* BPF write needs to be handled specially */
OpenPOWER on IntegriCloud