mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 23:09:34 +00:00
Merge pull request #16155 from httpstorm/gcc-14-compatibility
zebra: fix compilation with GCC14
This commit is contained in:
commit
c5bb4722c2
@ -15,6 +15,7 @@
|
|||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#endif
|
#endif
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
#include <libgen.h>
|
||||||
#include <sys/inotify.h>
|
#include <sys/inotify.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
@ -234,6 +235,7 @@ static void zebra_ns_ready_read(struct event *t)
|
|||||||
{
|
{
|
||||||
struct zebra_netns_info *zns_info = EVENT_ARG(t);
|
struct zebra_netns_info *zns_info = EVENT_ARG(t);
|
||||||
const char *netnspath;
|
const char *netnspath;
|
||||||
|
const char *netnspath_basename;
|
||||||
int err, stop_retry = 0;
|
int err, stop_retry = 0;
|
||||||
|
|
||||||
if (!zns_info)
|
if (!zns_info)
|
||||||
@ -261,23 +263,24 @@ static void zebra_ns_ready_read(struct event *t)
|
|||||||
zebra_ns_continue_read(zns_info, stop_retry);
|
zebra_ns_continue_read(zns_info, stop_retry);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
netnspath_basename = basename(strdupa(netnspath));
|
||||||
|
|
||||||
/* check default name is not already set */
|
/* check default name is not already set */
|
||||||
if (strmatch(VRF_DEFAULT_NAME, basename(netnspath))) {
|
if (strmatch(VRF_DEFAULT_NAME, netnspath_basename)) {
|
||||||
zlog_warn("NS notify : NS %s is already default VRF.Cancel VRF Creation", basename(netnspath));
|
zlog_warn("NS notify : NS %s is already default VRF.Cancel VRF Creation", netnspath_basename);
|
||||||
zebra_ns_continue_read(zns_info, 1);
|
zebra_ns_continue_read(zns_info, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (zebra_ns_notify_is_default_netns(basename(netnspath))) {
|
if (zebra_ns_notify_is_default_netns(netnspath_basename)) {
|
||||||
zlog_warn(
|
zlog_warn(
|
||||||
"NS notify : NS %s is default VRF. Ignore VRF creation",
|
"NS notify : NS %s is default VRF. Ignore VRF creation",
|
||||||
basename(netnspath));
|
netnspath_basename);
|
||||||
zebra_ns_continue_read(zns_info, 1);
|
zebra_ns_continue_read(zns_info, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* success : close fd and create zns context */
|
/* success : close fd and create zns context */
|
||||||
zebra_ns_notify_create_context_from_entry_name(basename(netnspath));
|
zebra_ns_notify_create_context_from_entry_name(netnspath_basename);
|
||||||
zebra_ns_continue_read(zns_info, 1);
|
zebra_ns_continue_read(zns_info, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -396,7 +399,7 @@ void zebra_ns_notify_parse(void)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* check default name is not already set */
|
/* check default name is not already set */
|
||||||
if (strmatch(VRF_DEFAULT_NAME, basename(dent->d_name))) {
|
if (strmatch(VRF_DEFAULT_NAME, basename(strdupa(dent->d_name)))) {
|
||||||
zlog_warn("NS notify : NS %s is already default VRF.Cancel VRF Creation", dent->d_name);
|
zlog_warn("NS notify : NS %s is already default VRF.Cancel VRF Creation", dent->d_name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user