diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2006-06-16 16:49:41 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2006-06-16 16:49:41 +0000 |
commit | 9812d2fe804b7eef6fe9c72ce9b46280bb295ed0 (patch) | |
tree | c41b8d76dde5b62775e228da888bf9b06187c66f /sys/netinet/ip_carp.c | |
parent | 0130c9137cea61e3309279b1ce04b5018ad92e83 (diff) |
adjust functions dealing with the routing table to take a table ID as
parameter so they can work on alternate tables. table 0 hardcoded for
many callers yet, that will be adapted step by step.
input + ok claudio norby hshoexer
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r-- | sys/netinet/ip_carp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 91949c77db5..defa6af28e4 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.126 2006/06/02 19:53:12 mpf Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.127 2006/06/16 16:49:40 henning Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -364,7 +364,7 @@ carp_setroute(struct carp_softc *sc, int cmd) /* Remove the existing host route, if any */ rtrequest(RTM_DELETE, ifa->ifa_addr, ifa->ifa_addr, ifa->ifa_netmask, - RTF_HOST, NULL); + RTF_HOST, NULL, 0); /* Check for our address on another interface */ /* XXX cries for proper API */ @@ -390,21 +390,22 @@ carp_setroute(struct carp_softc *sc, int cmd) rtrequest(RTM_ADD, ifa->ifa_addr, ifa->ifa_addr, ifa->ifa_netmask, - RTF_UP | RTF_HOST, NULL); + RTF_UP | RTF_HOST, NULL, 0); } if (!hr_otherif || nr_ourif || !rt) { if (nr_ourif && !(rt->rt_flags & RTF_CLONING)) rtrequest(RTM_DELETE, &sa, ifa->ifa_addr, - ifa->ifa_netmask, 0, NULL); + ifa->ifa_netmask, 0, NULL, + 0); ifa->ifa_rtrequest = arp_rtrequest; ifa->ifa_flags |= RTF_CLONING; if (rtrequest(RTM_ADD, ifa->ifa_addr, ifa->ifa_addr, ifa->ifa_netmask, 0, - NULL) == 0) + NULL, 0) == 0) ifa->ifa_flags |= IFA_ROUTE; } break; |