platform: properly change netns in do_change_link()

This commit is contained in:
Thomas Haller
2016-03-08 13:02:09 +01:00
parent b5c8d496c2
commit 7df7619e22

View File

@@ -3881,6 +3881,7 @@ do_change_link (NMPlatform *platform,
int ifindex,
struct nl_msg *nlmsg)
{
nm_auto_pop_netns NMPNetns *netns = NULL;
WaitForNlResponseResult seq_result = WAIT_FOR_NL_RESPONSE_RESULT_UNKNOWN;
int nle;
char s_buf[256];
@@ -3888,6 +3889,9 @@ do_change_link (NMPlatform *platform,
NMLogLevel log_level = LOGL_DEBUG;
const char *log_result = "failure", *log_detail = "";
if (!nm_platform_netns_push (platform, &netns))
return NM_PLATFORM_ERROR_UNSPECIFIED;
retry:
nle = _nl_send_auto_with_seq (platform, nlmsg, &seq_result);
if (nle < 0) {