diff options
author | Thomas Haller <thaller@redhat.com> | 2016-03-08 13:02:09 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-03-15 12:56:57 +0100 |
commit | 7df7619e2290d1e2a54a9c1f5af8d95353452a49 (patch) | |
tree | e3d2cc92e9eceb1a7e624b8bdc0e3e369d8faf17 | |
parent | b5c8d496c25f9de93c7839082403dab1249f0d4c (diff) | |
download | NetworkManager-7df7619e2290d1e2a54a9c1f5af8d95353452a49.tar.gz |
platform: properly change netns in do_change_link()
-rw-r--r-- | src/platform/nm-linux-platform.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index eaa302a39c..3536fd468b 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -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) { |