summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2013-05-11 19:05:38 +0000
committerhrs <hrs@FreeBSD.org>2013-05-11 19:05:38 +0000
commit960e7e9fd4f902c33ef15129c7fe48d67014ca2c (patch)
treef026acc75343454ccfc9289172130ed69d9e0f61 /sys/netinet
parent35ec1b4a110cad5eb51175c8cba9e210c99a6e72 (diff)
downloadFreeBSD-src-960e7e9fd4f902c33ef15129c7fe48d67014ca2c.zip
FreeBSD-src-960e7e9fd4f902c33ef15129c7fe48d67014ca2c.tar.gz
Add IFF_MONITOR support to gre(4).
Tested by: Chip Marshall MFC after: 1 week
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_gre.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c
index 0735311..776820f 100644
--- a/sys/netinet/ip_gre.c
+++ b/sys/netinet/ip_gre.c
@@ -205,6 +205,11 @@ gre_input2(struct mbuf *m ,int hlen, u_char proto)
bpf_mtap2(GRE2IFP(sc)->if_bpf, &af, sizeof(af), m);
}
+ if ((GRE2IFP(sc)->if_flags & IFF_MONITOR) != 0) {
+ m_freem(m);
+ return(NULL);
+ }
+
m->m_pkthdr.rcvif = GRE2IFP(sc);
netisr_queue(isr, m);
@@ -287,6 +292,11 @@ gre_mobile_input(struct mbuf *m, int hlen)
bpf_mtap2(GRE2IFP(sc)->if_bpf, &af, sizeof(af), m);
}
+ if ((GRE2IFP(sc)->if_flags & IFF_MONITOR) != 0) {
+ m_freem(m);
+ return;
+ }
+
m->m_pkthdr.rcvif = GRE2IFP(sc);
netisr_queue(NETISR_IP, m);
OpenPOWER on IntegriCloud