summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorJolan Luff <jolan@cvs.openbsd.org>2005-11-29 02:59:43 +0000
committerJolan Luff <jolan@cvs.openbsd.org>2005-11-29 02:59:43 +0000
commitadb4778804adba0245306281be53c4c3659bcb68 (patch)
treed19d9d4f1abd87230c6e6dfacb8381d75ec903f0 /sys/netinet
parent1095458dcf6143c8e7dd908e945fc791eee652d8 (diff)
something in the eurobsdcon route-a-thon broke my simple home network
router so back out the routing stuff to pre-eurobsdcon where my machine doesn't crash immediately. i am happy to test diffs and report success/failures but i am not happy to have instantaneous crashes when i reboot with a new kernel that was compiled from pristine sources. if you are going to be an elitist asshole then you could at least make sure your code works. ok and "be crass towards them" deraadt@
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/if_ether.c4
-rw-r--r--sys/netinet/ip_carp.c16
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 1fc87a02cf6..4bd58fa0e4f 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.c,v 1.60 2005/11/27 16:22:45 henning Exp $ */
+/* $OpenBSD: if_ether.c,v 1.61 2005/11/29 02:59:42 jolan Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
@@ -1077,7 +1077,7 @@ int
db_show_arptab()
{
struct radix_node_head *rnh;
- rnh = rt_gettable(AF_INET, 0);
+ rnh = rt_tables[AF_INET];
db_printf("Route tree for AF_INET\n");
if (rnh == NULL) {
db_printf(" (not initialized)\n");
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index ded38f8d7a7..0f48a1d7681 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.116 2005/11/27 16:22:45 henning Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.117 2005/11/29 02:59:42 jolan Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -339,8 +339,10 @@ carp_setroute(struct carp_softc *sc, int cmd)
case AF_INET: {
int count = 0;
struct sockaddr sa;
- struct sockaddr_in mask;
struct rtentry *rt;
+ struct radix_node_head *rnh =
+ rt_tables[ifa->ifa_addr->sa_family];
+ struct radix_node *rn;
int hr_otherif, nr_ourif;
/*
@@ -364,9 +366,8 @@ carp_setroute(struct carp_softc *sc, int cmd)
RTF_HOST, NULL);
/* Check for our address on another interface */
- memset(&mask, 1, sizeof(mask));
- rt = (struct rtentry *)rt_lookup(ifa->ifa_addr,
- sintosa(&mask), 0);
+ rn = rnh->rnh_matchaddr(ifa->ifa_addr, rnh);
+ rt = (struct rtentry *)rn;
hr_otherif = (rt && rt->rt_ifp != &sc->sc_if &&
rt->rt_flags & (RTF_CLONING|RTF_CLONED));
@@ -374,9 +375,8 @@ carp_setroute(struct carp_softc *sc, int cmd)
bcopy(ifa->ifa_addr, &sa, sizeof(sa));
satosin(&sa)->sin_addr.s_addr = satosin(ifa->ifa_netmask
)->sin_addr.s_addr & satosin(&sa)->sin_addr.s_addr;
-
- rt = (struct rtentry *)rt_lookup(&sa,
- ifa->ifa_netmask, 0);
+ rn = rnh->rnh_lookup(&sa, ifa->ifa_netmask, rnh);
+ rt = (struct rtentry *)rn;
nr_ourif = (rt && rt->rt_ifp == &sc->sc_if);
switch (cmd) {