summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_ipip.c
diff options
context:
space:
mode:
authoritojun <itojun@openbsd.org>2004-06-21 20:44:54 +0000
committeritojun <itojun@openbsd.org>2004-06-21 20:44:54 +0000
commit5695809171bf03b928ee29025575e84c45a5410c (patch)
tree6ca69d41ac48dae971187baf5d8ddf2e07994443 /sys/netinet/ip_ipip.c
parentRecognize cats as an arm machine. Dunno how this was missed before. (diff)
downloadwireguard-openbsd-5695809171bf03b928ee29025575e84c45a5410c.tar.xz
wireguard-openbsd-5695809171bf03b928ee29025575e84c45a5410c.zip
make it possble to use IPsec over link-local address (policy table uses
sin6_scope_id, IPsec porion uses embedded form). beck ok
Diffstat (limited to 'sys/netinet/ip_ipip.c')
-rw-r--r--sys/netinet/ip_ipip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c
index 4b3631a4333..5772e6e8ec7 100644
--- a/sys/netinet/ip_ipip.c
+++ b/sys/netinet/ip_ipip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipip.c,v 1.30 2003/12/10 07:22:43 itojun Exp $ */
+/* $OpenBSD: ip_ipip.c,v 1.31 2004/06/21 20:44:54 itojun Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -542,8 +542,8 @@ ipip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
ip6o->ip6_vfc |= IPV6_VERSION;
ip6o->ip6_plen = htons(m->m_pkthdr.len);
ip6o->ip6_hlim = ip_defttl;
- ip6o->ip6_dst = tdb->tdb_dst.sin6.sin6_addr;
- ip6o->ip6_src = tdb->tdb_src.sin6.sin6_addr;
+ in6_embedscope(&ip6o->ip6_src, &tdb->tdb_src.sin6, NULL, NULL);
+ in6_embedscope(&ip6o->ip6_dst, &tdb->tdb_dst.sin6, NULL, NULL);
#ifdef INET
if (tp == IPVERSION) {