Skip to content

Commit

Permalink
netlink linux: fix to append the netnsid netlink attr.
Browse files Browse the repository at this point in the history
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: 756819d ("netdev-linux: use netlink to update netdev.")
Acked-by: Aaron Conole <[email protected]>
Signed-off-by: Flavio Leitner <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
fleitner authored and blp committed Apr 16, 2019
1 parent b43762a commit 23fa50f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/netdev-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -6056,7 +6056,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);
Expand Down

0 comments on commit 23fa50f

Please sign in to comment.