diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2023-09-04 15:43:37 +0200 |
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2023-11-30 14:17:46 +0100 |
| commit | 427d3f81f4a8c040b52ecb2e1d7ba4224b2d069c (patch) | |
| tree | d2a94930269fb27370c1ca3aab63faaaa8290c08 | |
| parent | 82beaf6ae520f1c969755ae0ee82d2af2f150927 (diff) | |
zebra: clarify error when calling zebra_nhg_rib_find_nhe()
Display a specific log message when the rt_nhe parameter is not
set at all.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
| -rw-r--r-- | zebra/zebra_nhg.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index c38203df0f..c172f18cf1 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -1526,7 +1526,13 @@ zebra_nhg_rib_find_nhe(struct nhg_hash_entry *rt_nhe, afi_t rt_afi) { struct nhg_hash_entry *nhe = NULL; - if (!(rt_nhe && rt_nhe->nhg.nexthop)) { + if (!rt_nhe) { + flog_err(EC_ZEBRA_TABLE_LOOKUP_FAILED, + "No nhg_hash_entry passed to %s", __func__); + return NULL; + } + + if (!rt_nhe->nhg.nexthop) { flog_err(EC_ZEBRA_TABLE_LOOKUP_FAILED, "No nexthop passed to %s", __func__); return NULL; |
