summaryrefslogtreecommitdiffstats
path: root/src/plugins/vrrp
diff options
context:
space:
mode:
authorgaochx <chiso.gao@gmail.com>2023-01-09 17:56:09 +0800
committerMatthew Smith <mgsmith@netgate.com>2023-01-10 15:20:08 +0000
commit2b1b1154c41679d43bf9abbaf8787a284b05786b (patch)
tree6cb278e2bd92552855854aa03906649eba9fca3c /src/plugins/vrrp
parentc21775bd5c64ae99556761df01b7a06690de3df9 (diff)
vrrp: fix update virtual addr make mistake
When use update api delete a virtual address, no matter which IP want to delete, always delete the last one. Type: fix Signed-off-by: GaoChX <chiso.gao@gmail.com> Change-Id: Ia67c06dd53a442740794e1884d1a4aaa06965398
Diffstat (limited to 'src/plugins/vrrp')
-rw-r--r--src/plugins/vrrp/vrrp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/vrrp/vrrp.c b/src/plugins/vrrp/vrrp.c
index 12f4daee989..f3acb4756fc 100644
--- a/src/plugins/vrrp/vrrp.c
+++ b/src/plugins/vrrp/vrrp.c
@@ -662,7 +662,7 @@ vrrp_vr_addr_add_del (vrrp_vr_t * vr, u8 is_add, ip46_address_t * vr_addr)
{
if (!ip46_address_cmp (addr, vr_addr))
{
- vec_del1 (vr->config.vr_addrs, vr->config.vr_addrs - addr);
+ vec_del1 (vr->config.vr_addrs, addr - vr->config.vr_addrs);
break;
}
}
@@ -684,7 +684,7 @@ vrrp_vr_addr_add_del (vrrp_vr_t * vr, u8 is_add, ip46_address_t * vr_addr)
{
if (!ip46_address_cmp (addr, vr_addr))
{
- vec_del1 (vr->config.vr_addrs, vr->config.vr_addrs - addr);
+ vec_del1 (vr->config.vr_addrs, addr - vr->config.vr_addrs);
break;
}
}