mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 23:52:18 +00:00
pimd: Wisely delay startup of msdp listen/connect when vrf is not fully up
When we do not really have the vrf up, wisely do not attempt to dereference the ifp looked up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
05d8470ff5
commit
449a3f5b10
@ -153,6 +153,11 @@ int pim_msdp_sock_listen(struct pim_instance *pim)
|
||||
if (pim->vrf_id != VRF_DEFAULT) {
|
||||
struct interface *ifp =
|
||||
if_lookup_by_name(pim->vrf->name, pim->vrf_id);
|
||||
if (!ifp) {
|
||||
zlog_err("%s: Unable to lookup vrf interface: %s",
|
||||
__PRETTY_FUNCTION__, pim->vrf->name);
|
||||
return -1;
|
||||
}
|
||||
pim_socket_bind(sock, ifp);
|
||||
}
|
||||
|
||||
@ -226,6 +231,11 @@ int pim_msdp_sock_connect(struct pim_msdp_peer *mp)
|
||||
if (mp->pim->vrf_id != VRF_DEFAULT) {
|
||||
struct interface *ifp =
|
||||
if_lookup_by_name(mp->pim->vrf->name, mp->pim->vrf_id);
|
||||
if (!ifp) {
|
||||
zlog_err("%s: Unable to lookup vrf interface: %s",
|
||||
__PRETTY_FUNCTION__, mp->pim->vrf->name);
|
||||
return -1;
|
||||
}
|
||||
pim_socket_bind(mp->fd, ifp);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user