diff options
Diffstat (limited to 'isisd/isis_misc.c')
| -rw-r--r-- | isisd/isis_misc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/isisd/isis_misc.c b/isisd/isis_misc.c index 3aedd8ba1f..6e9cbaf98e 100644 --- a/isisd/isis_misc.c +++ b/isisd/isis_misc.c @@ -437,7 +437,7 @@ struct in_addr newprefix2inaddr(uint8_t *prefix_start, uint8_t prefix_masklen) * Returns the dynamic hostname associated with the passed system ID. * If no dynamic hostname found then returns formatted system ID. */ -const char *print_sys_hostname(uint8_t *sysid) +const char *print_sys_hostname(const uint8_t *sysid) { struct isis_dynhn *dyn; struct isis *isis = NULL; @@ -447,8 +447,7 @@ const char *print_sys_hostname(uint8_t *sysid) /* For our system ID return our host name */ isis = isis_lookup_by_sysid(sysid); - - if (isis != NULL) + if (isis && !CHECK_FLAG(im->options, F_ISIS_UNIT_TEST)) return cmd_hostname_get(); dyn = dynhn_find_by_id(sysid); |
