aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_gre.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_gre.c')
-rw-r--r--sys/net/if_gre.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index 55163416f807..ca9c4835daf6 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -609,7 +609,8 @@ gre_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
{
uint32_t af;
- if (dst->sa_family == AF_UNSPEC)
+ /* BPF writes need to be handled specially. */
+ if (dst->sa_family == AF_UNSPEC || dst->sa_family == pseudo_AF_HDRCMPLT)
bcopy(dst->sa_data, &af, sizeof(af));
else
af = RO_GET_FAMILY(ro, dst);