summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@gmail.com>2015-10-05 09:36:57 +0530
committerSusant Sahani <ssahani@gmail.com>2015-10-05 09:43:29 +0530
commitc06cb593eba5696cd0e92af59e864ce80d702ce4 (patch)
treeb2938e60ab585625aff67795f052177e61729a2e /src/libsystemd
parentced671e105e96c33e4ece1041dd7fbb0f2d4b0d3 (diff)
sd-rtnl: introduce new API to set the NL header flags
By default we set as NLM_F_CREATE | NLM_F_EXCL in sd_rtnl_message_new_link But incase of bridge we need to set NLM_F_REQUEST | NLM_F_ACK. If NLM_F_EXCL is set then we are unable to set the parameters. As bridge supports setting properties after creation not during creation.
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-netlink/netlink-message.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-message.c b/src/libsystemd/sd-netlink/netlink-message.c
index 0d8e37b856..cf693de5fb 100644
--- a/src/libsystemd/sd-netlink/netlink-message.c
+++ b/src/libsystemd/sd-netlink/netlink-message.c
@@ -149,6 +149,15 @@ int sd_netlink_message_get_type(sd_netlink_message *m, uint16_t *type) {
return 0;
}
+int sd_netlink_message_set_flags(sd_netlink_message *m, uint16_t flags) {
+ assert_return(m, -EINVAL);
+ assert_return(flags, -EINVAL);
+
+ m->hdr->nlmsg_flags = flags;
+
+ return 0;
+}
+
int sd_netlink_message_is_broadcast(sd_netlink_message *m) {
assert_return(m, -EINVAL);