diff --git a/include/version.h b/include/version.h index 0088493d..89d05974 100644 --- a/include/version.h +++ b/include/version.h @@ -1 +1 @@ -static const char version[] = "5.8.0"; +static const char version[] = "5.9.0"; diff --git a/ip/ipnetns.c b/ip/ipnetns.c index 46cc235b..14e8e087 100644 --- a/ip/ipnetns.c +++ b/ip/ipnetns.c @@ -75,9 +75,12 @@ static int ipnetns_have_nsid(void) }; int fd; - if (have_rtnl_getnsid < 0) { + if (have_rtnl_getnsid >= 0) { fd = open("/proc/self/ns/net", O_RDONLY); if (fd < 0) { + fprintf(stderr, + "/proc/self/ns/net: %s. Continuing anyway.\n", + strerror(errno)); have_rtnl_getnsid = 0; return 0; } @@ -85,8 +88,12 @@ static int ipnetns_have_nsid(void) addattr32(&req.n, 1024, NETNSA_FD, fd); if (rtnl_send(&rth, &req.n, req.n.nlmsg_len) < 0) { - perror("request send failed"); - exit(1); + fprintf(stderr, + "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); close(fd); diff --git a/lib/cg_map.c b/lib/cg_map.c index 77f030e3..39f244db 100644 --- a/lib/cg_map.c +++ b/lib/cg_map.c @@ -96,11 +96,10 @@ static void cg_init_map(void) mnt = find_cgroup2_mount(false); if (!mnt) - exit(1); + return; mntlen = strlen(mnt); - if (nftw(mnt, nftw_fn, 1024, FTW_MOUNT) < 0) - exit(1); + (void) nftw(mnt, nftw_fn, 1024, FTW_MOUNT); free(mnt); } diff --git a/tc/q_fq.c b/tc/q_fq.c index 98d1bf40..b10d01e9 100644 --- a/tc/q_fq.c +++ b/tc/q_fq.c @@ -253,7 +253,7 @@ static int fq_parse_opt(struct qdisc_util *qu, int argc, char **argv, &refill_delay, sizeof(refill_delay)); if (set_orphan_mask) addattr_l(n, 1024, TCA_FQ_ORPHAN_MASK, - &orphan_mask, sizeof(refill_delay)); + &orphan_mask, sizeof(orphan_mask)); if (set_ce_threshold) addattr_l(n, 1024, TCA_FQ_CE_THRESHOLD, &ce_threshold, sizeof(ce_threshold));