summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6_gif.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c
index 7b52cf87a9d..7ac4da53d54 100644
--- a/sys/netinet6/in6_gif.c
+++ b/sys/netinet6/in6_gif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_gif.c,v 1.7 2000/02/07 06:18:44 itojun Exp $ */
+/* $OpenBSD: in6_gif.c,v 1.8 2000/12/30 19:03:44 angelos Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -67,6 +67,8 @@
#include <net/net_osdep.h>
+#include "bridge.h"
+
#ifndef offsetof
#define offsetof(s, e) ((int)&((s *)0)->e)
#endif
@@ -144,6 +146,20 @@ in6_gif_output(ifp, family, m, rt)
return EAFNOSUPPORT;
}
+#if NBRIDGE > 0
+ if (family == AF_LINK) {
+ mp = NULL;
+ error = etherip_output(m, &tdb, &mp, 0, 0);
+ if (error)
+ return error;
+ else if (mp == NULL)
+ return EFAULT;
+
+ m = mp;
+ goto sendit;
+ }
+#endif /* NBRIDGE */
+
/* encapsulate into IPv6 packet */
mp = NULL;
error = ipip_output(m, &tdb, &mp, hlen, poff);
@@ -154,6 +170,7 @@ in6_gif_output(ifp, family, m, rt)
m = mp;
+ sendit:
/* See if out cached route remains the same */
if (dst->sin6_family != sin6_dst->sin6_family ||
!IN6_ARE_ADDR_EQUAL(&dst->sin6_addr, &sin6_dst->sin6_addr)) {