diff options
author | mlaier <mlaier@FreeBSD.org> | 2004-02-26 03:53:54 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2004-02-26 03:53:54 +0000 |
commit | 428f1c9a0fbaac94f9cce57cd846b2b6f82e17d1 (patch) | |
tree | aa20382749ac1e97a0e00869aaa3a69abbc95a34 /sys/netinet/ip_icmp.c | |
parent | 94f1c2c12e72d156571a8216199086ba2d775312 (diff) | |
download | FreeBSD-src-428f1c9a0fbaac94f9cce57cd846b2b6f82e17d1.zip FreeBSD-src-428f1c9a0fbaac94f9cce57cd846b2b6f82e17d1.tar.gz |
Tweak existing header and other build infrastructure to be able to build
pf/pflog/pfsync as modules. Do not list them in NOTES or modules/Makefile
(i.e. do not connect it to any (automatic) builds - yet).
Approved by: bms(mentor)
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r-- | sys/netinet/ip_icmp.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index a157dd5..ee4792c 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -82,7 +82,7 @@ * host table maintenance routines. */ -static struct icmpstat icmpstat; +struct icmpstat icmpstat; SYSCTL_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW, &icmpstat, icmpstat, ""); @@ -148,6 +148,7 @@ icmp_error(n, type, code, dest, destifp) register unsigned oiplen = oip->ip_hl << 2; register struct icmp *icp; register struct mbuf *m; + register struct m_tag *mtag; unsigned icmplen; #ifdef ICMPPRINTFS @@ -235,6 +236,16 @@ icmp_error(n, type, code, dest, destifp) nip->ip_hl = 5; nip->ip_p = IPPROTO_ICMP; nip->ip_tos = 0; + /* + * XXX: Move PF_GENERATED m_tag to new packet, if it exists. + * This should be replaced by unified flags/tags for + * pf/ipfw/ipf and future pfil_hook applications. + */ + mtag = m_tag_find(n, PACKET_TAG_PF_GENERATED, NULL); + if (mtag != NULL) { + m_tag_unlink(n, mtag); + m_tag_prepend(m, mtag); + } icmp_reflect(m); freeit: |