mirror of
https://github.com/systemd/systemd.git
synced 2025-01-03 05:18:09 +03:00
network: don't warn with no NSID assigned
This is nothing interesting to warn about. Also use the symbolic constant name when testing for this condition. (cherry picked from commite803e95760
) (cherry picked from commit0cddbebfbe
)
This commit is contained in:
parent
9678a5a1b3
commit
86197c1308
@ -304,7 +304,7 @@ static int property_get_namespace_nsid(
|
||||
* number. */
|
||||
|
||||
r = netns_get_nsid(/* netnsfd= */ -EBADF, &nsid);
|
||||
if (r < 0)
|
||||
if (r < 0 && r != -ENODATA)
|
||||
log_warning_errno(r, "Failed to query network nsid, ignoring: %m");
|
||||
|
||||
return sd_bus_message_append(reply, "u", nsid);
|
||||
|
@ -466,7 +466,7 @@ int netns_get_nsid(int netnsfd, uint32_t *ret) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (u == UINT32_MAX) /* no NSID assigned yet */
|
||||
if (u == (uint32_t) NETNSA_NSID_NOT_ASSIGNED) /* no NSID assigned yet */
|
||||
return -ENODATA;
|
||||
|
||||
if (ret)
|
||||
|
Loading…
Reference in New Issue
Block a user