summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-07-09 15:44:21 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-07-09 15:44:21 +0000
commit74c8e65b12d50b84bca2cad414861a6a3de2ec89 (patch)
tree338bddd45bc3356e2ad5565efdba9eca250cee4c /sys/netinet6
parent26c4cd9782328170d96bb0a2512781af5208a7d2 (diff)
Add the rtableid to struct rttimer and therefor make it available to
the callback functions. This fixes a problem where dynamic routes in different tables would not get deleted because the callback was doing the remove on the wrong table. OK henning@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/icmp6.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 6e903a12720..25a2380eb6c 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp6.c,v 1.112 2010/05/07 13:33:17 claudio Exp $ */
+/* $OpenBSD: icmp6.c,v 1.113 2010/07/09 15:44:20 claudio Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -2346,7 +2346,7 @@ icmp6_redirect_input(struct mbuf *m, int off)
if (newrt) {
(void)rt_timer_add(newrt, icmp6_redirect_timeout,
- icmp6_redirect_timeout_q);
+ icmp6_redirect_timeout_q, /* XXX */ 0);
rtfree(newrt);
}
}
@@ -2778,7 +2778,7 @@ icmp6_mtudisc_clone(struct sockaddr *dst)
rt = nrt;
}
error = rt_timer_add(rt, icmp6_mtudisc_timeout,
- icmp6_mtudisc_timeout_q);
+ icmp6_mtudisc_timeout_q, /* XXX */ 0);
if (error) {
rtfree(rt);
return NULL;
@@ -2801,7 +2801,8 @@ icmp6_mtudisc_timeout(struct rtentry *rt, struct rttimer *r)
info.rti_info[RTAX_DST] = rt_key(rt);
info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
info.rti_info[RTAX_NETMASK] = rt_mask(rt);
- rtrequest1(RTM_DELETE, &info, rt->rt_priority, NULL, 0);
+ rtrequest1(RTM_DELETE, &info, rt->rt_priority, NULL,
+ r->rtt_tableid);
} else {
if (!(rt->rt_rmx.rmx_locks & RTV_MTU))
rt->rt_rmx.rmx_mtu = 0;
@@ -2822,7 +2823,8 @@ icmp6_redirect_timeout(struct rtentry *rt, struct rttimer *r)
info.rti_info[RTAX_DST] = rt_key(rt);
info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
info.rti_info[RTAX_NETMASK] = rt_mask(rt);
- rtrequest1(RTM_DELETE, &info, rt->rt_priority, NULL, 0);
+ rtrequest1(RTM_DELETE, &info, rt->rt_priority, NULL,
+ r->rtt_tableid);
}
}