Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 sync with recent kame: fix source address selec...
details: https://anonhg.NetBSD.org/src/rev/008fd35be7d7
branches: trunk
changeset: 475781:008fd35be7d7
user: itojun <itojun%NetBSD.org@localhost>
date: Wed Aug 25 12:56:38 1999 +0000
description:
sync with recent kame: fix source address selection on IPv6 tunnel ipsec.
diffstat:
sys/netinet6/ipsec.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r a01f2d7a4edd -r 008fd35be7d7 sys/netinet6/ipsec.c
--- a/sys/netinet6/ipsec.c Wed Aug 25 12:38:14 1999 +0000
+++ b/sys/netinet6/ipsec.c Wed Aug 25 12:56:38 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.c,v 1.9 1999/07/31 18:41:16 itojun Exp $ */
+/* $NetBSD: ipsec.c,v 1.10 1999/08/25 12:56:38 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -1953,7 +1953,7 @@
s = (u_int8_t *)(&ip->ip_src);
d = (u_int8_t *)(&ip->ip_dst);
- snprintf(buf, sizeof(buf), "packet(SPI=%u ", ntohl(spi));
+ snprintf(buf, sizeof(buf), "packet(SPI=%u ", (u_int32_t)ntohl(spi));
for (p = buf; p && *p; p++)
;
snprintf(p, sizeof(buf) - (p - buf), "src=%d.%d.%d.%d",
@@ -1978,7 +1978,7 @@
static char buf[256];
char *p;
- snprintf(buf, sizeof(buf), "packet(SPI=%u ", ntohl(spi));
+ snprintf(buf, sizeof(buf), "packet(SPI=%u ", (u_int32_t)ntohl(spi));
for (p = buf; p && *p; p++)
;
snprintf(p, sizeof(buf) - (p - buf), "src=%s",
@@ -2003,7 +2003,7 @@
char *p;
struct secindex *idx = &sa->saidx->idx;
- snprintf(buf, sizeof(buf), "SA(SPI=%u ", ntohl(sa->spi));
+ snprintf(buf, sizeof(buf), "SA(SPI=%u ", (u_int32_t)ntohl(sa->spi));
for (p = buf; p && *p; p++)
;
if (idx->family == AF_INET) {
@@ -2574,12 +2574,15 @@
error = EHOSTUNREACH;
goto bad;
}
-
+#if 0 /* XXX Is the following need ? */
if (state->ro->ro_rt->rt_flags & RTF_GATEWAY) {
state->dst = (struct sockaddr *)state->ro->ro_rt->rt_gateway;
dst6 = (struct sockaddr_in6 *)state->dst;
}
- ia6 = in6_selectsrc(dst6, NULL, NULL, (struct route_in6 *)state->ro, &error);
+#endif
+ ia6 = in6_selectsrc(dst6, NULL, NULL,
+ (struct route_in6 *)state->ro,
+ &error);
if (ia6 == NULL)
goto bad;
ip6->ip6_src = *ia6;
Home |
Main Index |
Thread Index |
Old Index