diff options
| author | saravanank <saravanank@vmware.com> | 2020-03-19 03:06:46 -0700 |
|---|---|---|
| committer | saravanank <saravanank@vmware.com> | 2020-03-19 03:06:46 -0700 |
| commit | b279f95c7097dd66f43d4be09c0071ce1fdb83c5 (patch) | |
| tree | bd4c212c61df8cf19fca91e75ce61ca65f646b29 /pimd/pim_iface.c | |
| parent | 7f2ccbe562cae49fb8bf1770a0ec79b701ee41af (diff) | |
pimd: Pim hello should be sent with 0 hold time on address change on old src ip
RCA: This was todo item in current code base
Fix: Hello sent with 0 hold time before we update the pim ifp primary address
Signed-off-by: Saravanan K <saravanank@vmware.com>
Diffstat (limited to 'pimd/pim_iface.c')
| -rw-r--r-- | pimd/pim_iface.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index cb31878e01..647f1976e3 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -275,7 +275,7 @@ static void pim_addr_change(struct interface *ifp) 1) Before an interface goes down or changes primary IP address, a Hello message with a zero HoldTime should be sent immediately (with the old IP address if the IP address changed). - -- FIXME See CAVEAT C13 + -- Done at the caller of the function as new ip already updated here 2) After an interface has changed its IP address, it MUST send a Hello message with its new IP address. @@ -320,6 +320,10 @@ static int detect_primary_address_change(struct interface *ifp, } if (changed) { + /* Before updating pim_ifp send Hello time with 0 hold time */ + if (PIM_IF_TEST_PIM(pim_ifp->options)) { + pim_hello_send(ifp, 0 /* zero-sec holdtime */); + } pim_ifp->primary_address = new_prim_addr; } |
