bgpd: fix NULL deference in evpn-mh's log

Fix NULL deference issue in log. And change one word - "vtep",
it should be with lowercase letters like other places.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
This commit is contained in:
anlan_cs 2022-04-14 03:45:48 -04:00
parent 695c24c3b0
commit 46281b21af

View File

@ -385,9 +385,9 @@ int bgp_evpn_mh_route_update(struct bgp *bgp, struct bgp_evpn_es *es,
if (remote_pi) { if (remote_pi) {
flog_err( flog_err(
EC_BGP_ES_INVALID, EC_BGP_ES_INVALID,
"%u ERROR: local es route for ESI: %s Vtep %pI4 also learnt from remote", "%u ERROR: local es route for ESI: %s vtep %pI4 also learnt from remote",
bgp->vrf_id, es ? es->esi_str : "Null", bgp->vrf_id, es ? es->esi_str : "Null",
&es->originator_ip); es ? &es->originator_ip : NULL);
return -1; return -1;
} }