Message ID | 20190326171500.9174-3-fbl@sysclose.org |
---|---|
State | Accepted |
Headers | show |
Series | netdev-linux: fix update via netlink | expand |
Flavio Leitner <fbl@sysclose.org> writes: > The attribute was being prepended to the netlink buffer, but > the function nl_sock_transact_multiple__() expects to find the > netlink header as first to update the length, seq and pid fields. > > This patch fixes to append the attribute instead of prepending it. > > Fixes: 756819ddd788 ("netdev-linux: use netlink to update netdev.") > Signed-off-by: Flavio Leitner <fbl@sysclose.org> > --- Acked-by: Aaron Conole <aconole@redhat.com>
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 965e7eee8..5fcd2188a 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -6054,7 +6054,7 @@ netdev_linux_update_via_netlink(struct netdev_linux *netdev) * and the interface name statically stored in ovsdb. */ nl_msg_put_string(&request, IFLA_IFNAME, netdev_get_name(&netdev->up)); if (netdev_linux_netnsid_is_remote(netdev)) { - nl_msg_push_u32(&request, IFLA_IF_NETNSID, netdev->netnsid); + nl_msg_put_u32(&request, IFLA_IF_NETNSID, netdev->netnsid); } error = nl_transact(NETLINK_ROUTE, &request, &reply); ofpbuf_uninit(&request);
The attribute was being prepended to the netlink buffer, but the function nl_sock_transact_multiple__() expects to find the netlink header as first to update the length, seq and pid fields. This patch fixes to append the attribute instead of prepending it. Fixes: 756819ddd788 ("netdev-linux: use netlink to update netdev.") Signed-off-by: Flavio Leitner <fbl@sysclose.org> --- lib/netdev-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)