rdisc: fix setting netns during consturction of NMRDisc
authorThomas Haller <thaller@redhat.com>
Thu, 17 Mar 2016 15:19:02 +0000 (16:19 +0100)
committerThomas Haller <thaller@redhat.com>
Thu, 17 Mar 2016 15:19:09 +0000 (16:19 +0100)
We obtain the netns from the platform instance that is passed
in. It's wrong to set the current netns in nm_rdisc_init().

Fixes: 3ba944472853d5221ed83c369a77f80ee7305648

src/rdisc/nm-rdisc.c

index 7abcb70..689fe7f 100644 (file)
@@ -739,10 +739,6 @@ nm_rdisc_init (NMRDisc *rdisc)
 {
        NMRDiscPrivate *priv = NM_RDISC_GET_PRIVATE (rdisc);
 
-       rdisc->_netns = nmp_netns_get_current ();
-       if (rdisc->_netns)
-               g_object_ref (rdisc->_netns);
-
        rdisc->gateways = g_array_new (FALSE, FALSE, sizeof (NMRDiscGateway));
        rdisc->addresses = g_array_new (FALSE, FALSE, sizeof (NMRDiscAddress));
        rdisc->routes = g_array_new (FALSE, FALSE, sizeof (NMRDiscRoute));