summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl/rtnl-message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-rtnl/rtnl-message.c')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index 15e3247aca..a13bd48725 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -147,7 +147,8 @@ int sd_rtnl_message_new_link(uint16_t nlmsg_type, int index, sd_rtnl_message **r
int r;
assert_return(rtnl_message_type_is_link(nlmsg_type), -EINVAL);
- assert_return(nlmsg_type == RTM_NEWLINK || index > 0, -EINVAL);
+ assert_return(nlmsg_type == RTM_NEWLINK ||
+ nlmsg_type == RTM_SETLINK || index > 0, -EINVAL);
assert_return(ret, -EINVAL);
r = message_new(ret, NLMSG_SPACE(sizeof(struct ifinfomsg)));