summaryrefslogtreecommitdiff
path: root/sys/netinet/in.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-06-11 11:30:04 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-06-11 11:30:04 +0000
commite51920c000fc3bb33ac32431f93c1d14d8993e61 (patch)
tree453deac36d5a156fcd7b11c3eacf28e6bddf226a /sys/netinet/in.c
parent776ab6037aed51cacfd7c63b2214721185035329 (diff)
Always create a local route for every configured IPv4 address on the
machine and restore the original behavior of RTM_ADD and RTM_DELETE by always generating one message per locally configured address. Tested by krw@, jca@ and florian@
Diffstat (limited to 'sys/netinet/in.c')
-rw-r--r--sys/netinet/in.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 23796512c4d..bbf7db66c70 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.c,v 1.96 2014/04/25 09:44:38 mpi Exp $ */
+/* $OpenBSD: in.c,v 1.97 2014/06/11 11:30:03 mpi Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
@@ -702,6 +702,7 @@ out:
* carp(4).
*/
ifa_add(ifp, &ia->ia_ifa);
+ rt_ifa_addloop(&ia->ia_ifa);
if (error && newaddr)
in_purgeaddr(&ia->ia_ifa);
@@ -719,6 +720,8 @@ in_purgeaddr(struct ifaddr *ifa)
in_ifscrub(ifp, ia);
+ rt_ifa_delloop(&ia->ia_ifa);
+
ifa_del(ifp, &ia->ia_ifa);
TAILQ_REMOVE(&in_ifaddr, ia, ia_list);
if (ia->ia_allhosts != NULL) {