From eb09885d9876b1598c518413dde2fcf66989be0a Mon Sep 17 00:00:00 2001 From: Noriaki TAKAMIYA Date: Thu, 12 Jul 2007 03:02:41 +0900 Subject: [PATCH] [BUGFIX] MN: fixed to remove blackhole policy when mip6d stops. Reported by Romain KUNTZ . --- src/movement.c | 10 +++------- src/rtnl.h | 3 ++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/movement.c b/src/movement.c index 2a5fb39..e0edb82 100644 --- a/src/movement.c +++ b/src/movement.c @@ -74,15 +74,11 @@ static pthread_mutex_t iface_lock; static pthread_t md_listener; static int conf_default_autoconf = 1; -static int conf_default_ra = 1; static int conf_default_ra_defrtr = 1; -static int conf_default_ra_pinfo = 1; static int conf_default_rs = 3; static int conf_default_rs_ival = 4; static int conf_autoconf = 1; -static int conf_ra = 1; -static int conf_ra_pinfo = 1; static int conf_ra_defrtr = 0; static int conf_rs = 0; @@ -286,7 +282,7 @@ static void md_expire_router(struct md_i static void md_block_rule_del(struct md_inet6_iface *iface) { - rule_del(NULL, 0, IP6_RULE_PRIO_MIP6_BLOCK, RTN_BLACKHOLE, + rule_del(NULL, 0, IP6_RULE_PRIO_MIP6_BLOCK_HOA, RTN_BLACKHOLE, &in6addr_any, 0, &in6addr_any, 0, 0); rule_del(NULL, RT6_TABLE_MAIN, IP6_RULE_PRIO_MIP6_COA_OUT, RTN_UNICAST, &in6addr_any, 128, &in6addr_any, 0, 0); @@ -818,7 +814,7 @@ static int process_neigh(struct nlmsghdr return 0; } -static int process_nlmsg(struct sockaddr_nl *who, +static int process_nlmsg(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) { pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); @@ -1332,7 +1328,7 @@ static int md_block_rule_add(struct md_i on CoA to make routing and tunnel end-point updates atomic during handoff */ return rule_add(NULL, 0, - IP6_RULE_PRIO_MIP6_BLOCK, RTN_BLACKHOLE, + IP6_RULE_PRIO_MIP6_BLOCK_HOA, RTN_BLACKHOLE, &in6addr_any, 0, &in6addr_any, 0, 0); } diff --git a/src/rtnl.h b/src/rtnl.h index 26cd452..9cc9b34 100644 --- a/src/rtnl.h +++ b/src/rtnl.h @@ -19,7 +19,8 @@ #define IP6_RT_PRIO_ADDRCONF 256 #define IP6_RULE_PRIO_MIP6_HOA_OUT 1001 #define IP6_RULE_PRIO_MIP6_COA_OUT 1002 #define IP6_RULE_PRIO_MIP6_BLOCK 1003 -#define IP6_RULE_PRIO_MIP6_FWD 1004 +#define IP6_RULE_PRIO_MIP6_BLOCK_HOA 1004 +#define IP6_RULE_PRIO_MIP6_FWD 1005 static inline int rtnl_route_open(struct rtnl_handle *rth, unsigned subscriptions) -- 1.4.3.GIT