From 74c8e65b12d50b84bca2cad414861a6a3de2ec89 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Fri, 9 Jul 2010 15:44:21 +0000 Subject: 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@ --- sys/net/route.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/net/route.h') diff --git a/sys/net/route.h b/sys/net/route.h index 2421f795153..5c97082cebd 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -1,4 +1,4 @@ -/* $OpenBSD: route.h,v 1.70 2010/06/29 21:28:37 reyk Exp $ */ +/* $OpenBSD: route.h,v 1.71 2010/07/09 15:44:20 claudio Exp $ */ /* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */ /* @@ -310,6 +310,7 @@ struct rttimer { void (*rtt_func)(struct rtentry *, struct rttimer *); time_t rtt_time; /* When this timer was registered */ + u_int rtt_tableid; /* routing table id of rtt_rt */ }; struct rttimer_queue { @@ -373,7 +374,7 @@ void rt_setmetrics(u_long, struct rt_metrics *, struct rt_kmetrics *); void rt_getmetrics(struct rt_kmetrics *, struct rt_metrics *); int rt_timer_add(struct rtentry *, void(*)(struct rtentry *, struct rttimer *), - struct rttimer_queue *); + struct rttimer_queue *, u_int); void rt_timer_init(void); struct rttimer_queue * rt_timer_queue_create(u_int); -- cgit v1.2.3