diff options
| author | Corey Siltala <csiltala@atcorp.com> | 2024-08-23 18:04:26 +0000 | 
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-08-24 08:13:31 +0000 | 
| commit | 86a7cc896a8b934225a7c7e96edd9c93db98452d (patch) | |
| tree | e582c2df9a344c159730ac52ac233fb6e55e01de /pimd | |
| parent | a23ef654ed96a13694319978f05ecc7b02e9523b (diff) | |
pimd: Fix crash in pimd
ifp->info is not always set in PIM. So add a guard here to stop
it from crashing when addresses are added to a non-PIM enabled interface
and PIM zebra debugging is enabled.
Signed-off-by: Corey Siltala <csiltala@atcorp.com>
(cherry picked from commit 12a783d313fccb0a2793f32be57b687dba736e0d)
Diffstat (limited to 'pimd')
| -rw-r--r-- | pimd/pim_zebra.c | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 04cd087e6a..e25eafc28e 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -97,7 +97,10 @@ static int pim_zebra_if_address_add(ZAPI_CALLBACK_ARGS)  	if (PIM_DEBUG_ZEBRA) {  		zlog_debug("%s: %s(%s) connected IP address %pFX flags %u %s", -			   __func__, c->ifp->name, VRF_LOGNAME(pim_ifp->pim->vrf), p, c->flags, +			   __func__, c->ifp->name, +			   (pim_ifp ? VRF_LOGNAME(pim_ifp->pim->vrf) +				    : "Unknown"), +			   p, c->flags,  			   CHECK_FLAG(c->flags, ZEBRA_IFA_SECONDARY)  				   ? "secondary"  				   : "primary");  | 
