diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/loopback-setup.c | 2 | ||||
-rw-r--r-- | src/libsystemd/sd-rtnl/rtnl-message.c | 7 | ||||
-rw-r--r-- | src/network/networkd-link.c | 2 | ||||
-rw-r--r-- | src/systemd/sd-rtnl.h | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/src/core/loopback-setup.c b/src/core/loopback-setup.c index ffe661aa9e..7eb28fc039 100644 --- a/src/core/loopback-setup.c +++ b/src/core/loopback-setup.c @@ -95,7 +95,7 @@ static int start_interface(sd_rtnl *rtnl, int if_loopback, struct in_addr *ipv4_ if (r < 0) return r; - r = sd_rtnl_message_link_set_flags(req, IFF_UP); + r = sd_rtnl_message_link_set_flags(req, IFF_UP, IFF_UP); if (r < 0) return r; diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c index 984115c3c0..af8f8cf762 100644 --- a/src/libsystemd/sd-rtnl/rtnl-message.c +++ b/src/libsystemd/sd-rtnl/rtnl-message.c @@ -167,13 +167,16 @@ int sd_rtnl_message_route_new(uint16_t nlmsg_type, unsigned char rtm_family, return 0; } -int sd_rtnl_message_link_set_flags(sd_rtnl_message *m, unsigned flags) { +int sd_rtnl_message_link_set_flags(sd_rtnl_message *m, unsigned flags, unsigned change) { struct ifinfomsg *ifi; ifi = NLMSG_DATA(m->hdr); ifi->ifi_flags = flags; - ifi->ifi_change = 0xffffffff; + if (change) + ifi->ifi_change = change; + else + ifi->ifi_change = 0xffffffff; return 0; } diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index f1c2889ba4..2fa77f15ff 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -713,7 +713,7 @@ static int link_up(Link *link) { return r; } - r = sd_rtnl_message_link_set_flags(req, IFF_UP); + r = sd_rtnl_message_link_set_flags(req, IFF_UP, IFF_UP); if (r < 0) { log_error_link(link, "Could not set link flags: %s", strerror(-r)); return r; diff --git a/src/systemd/sd-rtnl.h b/src/systemd/sd-rtnl.h index 7d626b8403..0feb8c673e 100644 --- a/src/systemd/sd-rtnl.h +++ b/src/systemd/sd-rtnl.h @@ -84,7 +84,7 @@ sd_rtnl_message *sd_rtnl_message_unref(sd_rtnl_message *m); int sd_rtnl_message_get_errno(sd_rtnl_message *m); int sd_rtnl_message_get_type(sd_rtnl_message *m, uint16_t *type); -int sd_rtnl_message_link_set_flags(sd_rtnl_message *m, unsigned flags); +int sd_rtnl_message_link_set_flags(sd_rtnl_message *m, unsigned flags, unsigned change); int sd_rtnl_message_link_set_type(sd_rtnl_message *m, unsigned type); int sd_rtnl_message_link_get_ifindex(sd_rtnl_message *m, int *ifindex); int sd_rtnl_message_link_get_flags(sd_rtnl_message *m, unsigned *flags); |