carp: Fix routes reset issue
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 29 May 2013 12:41:40 +0000 (20:41 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 30 May 2013 07:13:01 +0000 (15:13 +0800)
commit2c1793932940230c08a7de65090d8a49ede91459
tree759a8552c8b3b1cab4ebdd84dee288967a9fec2a
parentd25983ed7b223e89c510c799dbe2e185f786a8ca
carp: Fix routes reset issue

Before this commit, routes related to carp or carp backing device were
reset, i.e. only prefix route was left, when carp state changed, e.g.
carp is down.

This commit fixes this routes reset issue by replacing the carp or carp
device routes' rt_ifa and rt_ifp with proper ifaddr and ifnet, instead
of discarding the old routes and installing the new prefix route.

Reported-by: robgar
sys/net/route.c
sys/net/route.h
sys/netinet/in.c
sys/netinet/in_rmx.c
sys/netinet/in_var.h
sys/netinet/ip_carp.c