diff options
author | hrs <hrs@FreeBSD.org> | 2013-05-11 19:05:38 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2013-05-11 19:05:38 +0000 |
commit | 960e7e9fd4f902c33ef15129c7fe48d67014ca2c (patch) | |
tree | f026acc75343454ccfc9289172130ed69d9e0f61 /sys/netinet | |
parent | 35ec1b4a110cad5eb51175c8cba9e210c99a6e72 (diff) | |
download | FreeBSD-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.c | 10 |
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); |