Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
commit
eb12cc9ae1
|
|
@ -1 +1 @@
|
||||||
static const char version[] = "5.8.0";
|
static const char version[] = "5.9.0";
|
||||||
|
|
|
||||||
13
ip/ipnetns.c
13
ip/ipnetns.c
|
|
@ -75,9 +75,12 @@ static int ipnetns_have_nsid(void)
|
||||||
};
|
};
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
if (have_rtnl_getnsid < 0) {
|
if (have_rtnl_getnsid >= 0) {
|
||||||
fd = open("/proc/self/ns/net", O_RDONLY);
|
fd = open("/proc/self/ns/net", O_RDONLY);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"/proc/self/ns/net: %s. Continuing anyway.\n",
|
||||||
|
strerror(errno));
|
||||||
have_rtnl_getnsid = 0;
|
have_rtnl_getnsid = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -85,8 +88,12 @@ static int ipnetns_have_nsid(void)
|
||||||
addattr32(&req.n, 1024, NETNSA_FD, fd);
|
addattr32(&req.n, 1024, NETNSA_FD, fd);
|
||||||
|
|
||||||
if (rtnl_send(&rth, &req.n, req.n.nlmsg_len) < 0) {
|
if (rtnl_send(&rth, &req.n, req.n.nlmsg_len) < 0) {
|
||||||
perror("request send failed");
|
fprintf(stderr,
|
||||||
exit(1);
|
"rtnl_send(RTM_GETNSID): %s. Continuing anyway.\n",
|
||||||
|
strerror(errno));
|
||||||
|
have_rtnl_getnsid = 0;
|
||||||
|
close(fd);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
rtnl_listen(&rth, ipnetns_accept_msg, NULL);
|
rtnl_listen(&rth, ipnetns_accept_msg, NULL);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
|
||||||
|
|
@ -96,11 +96,10 @@ static void cg_init_map(void)
|
||||||
|
|
||||||
mnt = find_cgroup2_mount(false);
|
mnt = find_cgroup2_mount(false);
|
||||||
if (!mnt)
|
if (!mnt)
|
||||||
exit(1);
|
return;
|
||||||
|
|
||||||
mntlen = strlen(mnt);
|
mntlen = strlen(mnt);
|
||||||
if (nftw(mnt, nftw_fn, 1024, FTW_MOUNT) < 0)
|
(void) nftw(mnt, nftw_fn, 1024, FTW_MOUNT);
|
||||||
exit(1);
|
|
||||||
|
|
||||||
free(mnt);
|
free(mnt);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,7 @@ static int fq_parse_opt(struct qdisc_util *qu, int argc, char **argv,
|
||||||
&refill_delay, sizeof(refill_delay));
|
&refill_delay, sizeof(refill_delay));
|
||||||
if (set_orphan_mask)
|
if (set_orphan_mask)
|
||||||
addattr_l(n, 1024, TCA_FQ_ORPHAN_MASK,
|
addattr_l(n, 1024, TCA_FQ_ORPHAN_MASK,
|
||||||
&orphan_mask, sizeof(refill_delay));
|
&orphan_mask, sizeof(orphan_mask));
|
||||||
if (set_ce_threshold)
|
if (set_ce_threshold)
|
||||||
addattr_l(n, 1024, TCA_FQ_CE_THRESHOLD,
|
addattr_l(n, 1024, TCA_FQ_CE_THRESHOLD,
|
||||||
&ce_threshold, sizeof(ce_threshold));
|
&ce_threshold, sizeof(ce_threshold));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue