From 16017a3e1f00af9de745fab9a90b69f836cd4c40 Mon Sep 17 00:00:00 2001 From: Masafumi Aramoto Date: Sun, 19 Aug 2007 17:01:05 +0900 Subject: [PATCH] [BUGFIX] MN: not to overwrite the RO policy at sending BU. In case tha MN1 has the BCE of MN2, MN1 has already inserted RO policy when MN1 send BU to MN2. MN1 shoud not insert this RO policy in such a case. --- src/xfrm.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/xfrm.c b/src/xfrm.c index 65767ad..859c84d 100644 --- a/src/xfrm.c +++ b/src/xfrm.c @@ -1697,6 +1697,7 @@ int xfrm_pre_bu_add_bule(struct bulentry int rsig = bule->xfrm_state & BUL_XFRM_STATE_SIG; int rdata = bule->xfrm_state & BUL_XFRM_STATE_DATA; int prio; + int exist = 0; if (bule->flags & IP6_MH_BU_HOME) { struct home_addr_info *hai = bule->home; @@ -1742,9 +1743,10 @@ int xfrm_pre_bu_add_bule(struct bulentry return -1; } bcache_release_entry(bce); + exist = 1; } } - if (_mn_bule_ro_pol_add(bule, bule->home->if_tunnel, rdata)) + if(!exist &&_mn_bule_ro_pol_add(bule, bule->home->if_tunnel, rdata)) return -1; set_selector(&bule->peer_addr, &bule->hoa, 0, 0, 0, 0, &sel); /* XXX: acquired state is already inserted */ -- 1.4.3.GIT