diff options
| author | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2018-01-22 18:12:13 -0800 |
|---|---|---|
| committer | mitesh <mitesh@cumulusnetworks.com> | 2018-02-08 23:06:30 -0800 |
| commit | bca63dc8baf1c309addf47df7ea0f1725e975dac (patch) | |
| tree | 6cc9eafcb4e60ce1a50b9115789fef29878ee5c7 /zebra/zebra_vxlan.c | |
| parent | 4ac71d4bea5f9a7b01d717ed6955f88035c92d9c (diff) | |
zebra: Handle change to VxLAN tunnel (local) IP address for L3 VNI similar to what is done for L2 VNI.
Ticket: CM-19195
Review: CCR-7122
Test: Manual
Signed-of-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_vxlan.c')
| -rw-r--r-- | zebra/zebra_vxlan.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 850ee50969..01d5e16556 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -6301,14 +6301,21 @@ int zebra_vxlan_if_update(struct interface *ifp, u_int16_t chgflags) zebra_vxlan_process_l3vni_oper_down(zl3vni); zl3vni->svi_if = NULL; zl3vni->svi_if = zl3vni_map_to_svi_if(zl3vni); + zl3vni->local_vtep_ip = vxl->vtep_ip; if (is_l3vni_oper_up(zl3vni)) zebra_vxlan_process_l3vni_oper_up( zl3vni); } } - /* if we have a valid new master, process l3-vni oper up */ - if (chgflags & ZEBRA_VXLIF_MASTER_CHANGE) { + /* Update local tunnel IP. */ + zl3vni->local_vtep_ip = vxl->vtep_ip; + + /* if we have a valid new master or there is a change to the tunnel IP, + * process l3-vni oper up + */ + if (chgflags + & (ZEBRA_VXLIF_MASTER_CHANGE | ZEBRA_VXLIF_LOCAL_IP_CHANGE)) { if (is_l3vni_oper_up(zl3vni)) zebra_vxlan_process_l3vni_oper_up(zl3vni); } |
