From 6a5a68ee9aff1c56e4354d22c19261fd0ba4ab2b Mon Sep 17 00:00:00 2001 From: Noriaki TAKAMIYA Date: Thu, 23 Aug 2007 23:08:39 +0900 Subject: [PATCH] [BUGFIX] MN: fixed to use correct nonce index to send BU. --- src/retrout.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/retrout.c b/src/retrout.c index aefa893..7b2df45 100644 --- a/src/retrout.c +++ b/src/retrout.c @@ -703,6 +703,8 @@ static void mn_recv_cot(const struct ip6 continue; } + bule->rr.co_ni = index; + if (!bule->do_send_bu) { /* This happens when we automatically refresh home * keygen token while binding still in use */ @@ -717,7 +719,6 @@ static void mn_recv_cot(const struct ip6 RRDBG("Got CoT and found RR entry for home address\n"); bule->rr.state = RR_READY; bule->rr.ho_ni = rre_ho->index; - bule->rr.co_ni = index; rr_mn_calc_Kbm(rre_ho->kgen_token, keygen, bule->Kbm); mn_send_cn_bu(bule); } @@ -784,13 +785,13 @@ static void mn_recv_hot(const struct ip6 rre_ho->resend_count = 0; memcpy(rre_ho->kgen_token, keygen, sizeof(rre_ho->kgen_token)); rre_ho->index = index; + bule->rr.ho_ni = index; if (bule->dereg) { /* Dereg BUL entry waiting for RR_READY */ RRDBG("Got HoT\n"); if (bule->do_send_bu) { bule->rr.state = RR_READY; - bule->rr.ho_ni = index; bule->rr.co_ni = 0; rr_mn_calc_Kbm(keygen, NULL, bule->Kbm); mn_send_cn_bu(bule); @@ -803,7 +804,6 @@ static void mn_recv_hot(const struct ip6 RRDBG("Got HoT and found RR entry for care-of address\n"); /* Foreign Reg BU case */ bule->rr.state = RR_READY; - bule->rr.ho_ni = index; bule->rr.co_ni = rre_co->index; rr_mn_calc_Kbm(keygen, rre_co->kgen_token, bule->Kbm); mn_send_cn_bu(bule); -- 1.4.3.GIT