diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2011-11-19 13:54:54 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2011-11-19 13:54:54 +0000 |
commit | 4483b1e33f916221f747c95f5b215b546d07df64 (patch) | |
tree | 145fc19a6b86356d3016765257a4f248eef0c912 /sys/netinet/ip_carp.c | |
parent | 5814b883e77b8c62b63549bd51455d06ac41bdb6 (diff) |
Select a routing table according to the rdomain. Allows one
to connect to the carp address when the carpdev interface has
an ip address too in the non-default rdomain.
ok claudio
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r-- | sys/netinet/ip_carp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index d861ee53b08..cee7a87beac 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.193 2011/10/30 20:38:55 mpf Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.194 2011/11/19 13:54:53 mikeb Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -434,7 +434,8 @@ carp_setroute(struct carp_softc *sc, int cmd) /* Check for our address on another interface */ /* XXX cries for proper API */ - rnh = rt_gettable(ifa->ifa_addr->sa_family, 0); + rnh = rt_gettable(ifa->ifa_addr->sa_family, + sc->sc_if.if_rdomain); rn = rnh->rnh_matchaddr(ifa->ifa_addr, rnh); rt = (struct rtentry *)rn; hr_otherif = (rt && rt->rt_ifp != &sc->sc_if && |