diff options
author | Tom Gundersen <teg@jklm.no> | 2016-01-27 01:17:52 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2016-01-27 01:17:52 +0100 |
commit | 1cdc94482302cca88e0a7282bbc161c1d77c381c (patch) | |
tree | f15fe3b92fa43b6b8f96fdfb3e443256fa53d839 /src/libsystemd/sd-netlink | |
parent | 47889a8367aa791efc9e83b619ec1fec53e218b0 (diff) | |
parent | ea0288d17c0713eea601ea6c7715a649842d229d (diff) |
Merge pull request #1975 from ssahani/vxlan2
networkd: Add support to configure VXLAN Port
Diffstat (limited to 'src/libsystemd/sd-netlink')
-rw-r--r-- | src/libsystemd/sd-netlink/netlink-message.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-message.c b/src/libsystemd/sd-netlink/netlink-message.c index 50792bc4a3..b1b3bccc44 100644 --- a/src/libsystemd/sd-netlink/netlink-message.c +++ b/src/libsystemd/sd-netlink/netlink-message.c @@ -342,6 +342,19 @@ int sd_netlink_message_append_u32(sd_netlink_message *m, unsigned short type, ui return 0; } +int sd_netlink_message_append_data(sd_netlink_message *m, unsigned short type, const void *data, size_t len) { + int r; + + assert_return(m, -EINVAL); + assert_return(!m->sealed, -EPERM); + + r = add_rtattr(m, type, &data, len); + if (r < 0) + return r; + + return 0; +} + int sd_netlink_message_append_in_addr(sd_netlink_message *m, unsigned short type, const struct in_addr *data) { int r; |