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.
}
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;
}
#include "pim_bsm.h"
static int on_pim_hello_send(struct thread *t);
-static int pim_hello_send(struct interface *ifp, uint16_t holdtime);
static const char *pim_pim_msgtype2str(enum pim_msg_type type)
{
return 0;
}
-static int pim_hello_send(struct interface *ifp, uint16_t holdtime)
+int pim_hello_send(struct interface *ifp, uint16_t holdtime)
{
struct pim_interface *pim_ifp = ifp->info;
int pim_msg_send(int fd, struct in_addr src, struct in_addr dst,
uint8_t *pim_msg, int pim_msg_size, const char *ifname);
+int pim_hello_send(struct interface *ifp, uint16_t holdtime);
#endif /* PIM_PIM_H */