summaryrefslogtreecommitdiff
path: root/sys/netinet6/in6.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2008-05-11 08:13:03 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2008-05-11 08:13:03 +0000
commitc73f4b62daca8b4421b315de76f626e26eec01fd (patch)
treea9cdc9e3605fc2d8aa7519843ae536a67fe0e551 /sys/netinet6/in6.c
parent0ab019540381ecceda6e2f49e50fb3fa73e97e48 (diff)
rtrequest to rtrequest1 conversion in inet6. With that no rtrequest should
be left over. OK henning@
Diffstat (limited to 'sys/netinet6/in6.c')
-rw-r--r--sys/netinet6/in6.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 27015a5ce96..e15fd857c37 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.74 2008/05/07 05:14:21 claudio Exp $ */
+/* $OpenBSD: in6.c,v 1.75 2008/05/11 08:13:02 claudio Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
@@ -141,6 +141,7 @@ struct multi6_kludge {
static void
in6_ifloop_request(int cmd, struct ifaddr *ifa)
{
+ struct rt_addrinfo info;
struct sockaddr_in6 lo_sa;
struct sockaddr_in6 all1_sa;
struct rtentry *nrt = NULL;
@@ -162,8 +163,12 @@ in6_ifloop_request(int cmd, struct ifaddr *ifa)
* which changes the outgoing interface to the loopback interface.
* XXX only table 0 for now
*/
- e = rtrequest(cmd, ifa->ifa_addr, ifa->ifa_addr,
- (struct sockaddr *)&all1_sa, RTF_UP|RTF_HOST|RTF_LLINFO, &nrt, 0);
+ bzero(&info, sizeof(info));
+ info.rti_flags = RTF_UP | RTF_HOST | RTF_LLINFO;
+ info.rti_info[RTAX_DST] = ifa->ifa_addr;
+ info.rti_info[RTAX_GATEWAY] = ifa->ifa_addr;
+ info.rti_info[RTAX_NETMASK] = (struct sockaddr *)&all1_sa;
+ e = rtrequest1(cmd, &info, RTP_CONNECTED, &nrt, 0);
if (e != 0) {
log(LOG_ERR, "in6_ifloop_request: "
"%s operation failed for %s (errno=%d)\n",