From 521d286cc65a5b72e7f0471c896ce785514d1c64 Mon Sep 17 00:00:00 2001 From: claudio Date: Sun, 13 Jul 2008 20:41:39 +0000 Subject: [PATCH] Do not specify the gateway on RTM_DELETE -- similar fix was done in the arp code. This fixes in6_ifloop_request warnings seen on carp interfaces. OK henning@, found and tested by david@ --- sys/netinet6/in6.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 6c57d476969..e4f200b54a3 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.c,v 1.77 2008/06/11 19:00:50 mcbride Exp $ */ +/* $OpenBSD: in6.c,v 1.78 2008/07/13 20:41:39 claudio Exp $ */ /* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */ /* @@ -166,7 +166,8 @@ in6_ifloop_request(int cmd, struct ifaddr *ifa) 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; + if (cmd != RTM_DELETE) + 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) { -- 2.20.1