summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_gre.c11
-rw-r--r--sys/netinet/ip_gre.c10
2 files changed, 19 insertions, 2 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index 33f48fd5626..63695536a0d 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.c,v 1.44 2008/06/26 05:42:20 ray Exp $ */
+/* $OpenBSD: if_gre.c,v 1.45 2009/06/02 17:10:23 henning Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -42,6 +42,7 @@
#if NGRE > 0
#include "bpfilter.h"
+#include "pf.h"
#include <sys/param.h>
#include <sys/proc.h>
@@ -77,6 +78,10 @@
#include <net/bpf.h>
#endif
+#if NPF > 0
+#include <net/pfvar.h>
+#endif
+
#include <net/if_gre.h>
#ifndef GRE_RECURSION_LIMIT
@@ -405,6 +410,10 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
ifp->if_opackets++;
ifp->if_obytes += m->m_pkthdr.len;
+#if NPF > 0
+ pf_pkt_addr_changed(m);
+#endif
+
/* Send it off */
error = ip_output(m, (void *)NULL, &sc->route, 0, (void *)NULL, (void *)NULL);
end:
diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c
index b3917e881f5..886706ab10f 100644
--- a/sys/netinet/ip_gre.c
+++ b/sys/netinet/ip_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_gre.c,v 1.32 2008/06/26 05:42:20 ray Exp $ */
+/* $OpenBSD: ip_gre.c,v 1.33 2009/06/02 17:10:23 henning Exp $ */
/* $NetBSD: ip_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -69,6 +69,11 @@
#endif
#include "bpfilter.h"
+#include "pf.h"
+
+#if NPF > 0
+#include <net/pfvar.h>
+#endif
/* Needs IP headers. */
#include <net/if_gre.h>
@@ -188,6 +193,9 @@ gre_input2(m , hlen, proto)
if (sc->sc_if.if_bpf)
bpf_mtap_af(sc->sc_if.if_bpf, af, m, BPF_DIRECTION_IN);
#endif
+#if NPF > 0
+ pf_pkt_addr_changed(m);
+#endif
s = splnet(); /* possible */
IF_INPUT_ENQUEUE(ifq, m);