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