loopback: use ERRNO_IS_PRIVILEGE() where appropriate

This commit is contained in:
Lennart Poettering
2022-08-29 15:11:09 +02:00
parent 9d72a3cf70
commit b3d6f70692

View File

@@ -208,7 +208,7 @@ int loopback_setup(void) {
/* If we lack the permissions to configure the loopback device,
* but we find it to be already configured, let's exit cleanly,
* in order to supported unprivileged containers. */
if (state_up.rcode == -EPERM && check_loopback(rtnl))
if (ERRNO_IS_PRIVILEGE(state_up.rcode) && check_loopback(rtnl))
return 0;
return log_warning_errno(state_up.rcode, "Failed to configure loopback network device: %m");