After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763323 - [review] more fixes for network namespace (netns) [th/netns-aware-bgo763323]
[review] more fixes for network namespace (netns) [th/netns-aware-bgo763323]
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-03-08 13:27 UTC by Thomas Haller
Modified: 2016-03-15 12:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2016-03-08 13:27:41 UTC
To make NM eventually capable of handling netns', we must inject the proper NMPNetns/NMPlatform as needed instead of using the global NM_PLATFORM_GET instance.
Comment 1 Thomas Haller 2016-03-08 13:32:53 UTC
The last two patches are still unused code, but eventually we want to do something like this. Hence, I'd also just merge them.
    platform: add nmp_netns_bind_to_path() helper function
    platform: add nm_platform_link_set_netns() function
Comment 2 Beniamino Galvani 2016-03-14 13:57:06 UTC
> rdisc: make NMRDisc namespace aware

 typedef struct {
        GObject parent;

+       NMPlatform *_platform;
+       NMPNetns *_netns;

        int ifindex;
        char *ifname;

Nitpick: naming is different from other members (leading underscore), I don't know if it's on purpose.
Otherwise LGTM.
Comment 3 Thomas Haller 2016-03-15 12:00:04 UTC
(In reply to Beniamino Galvani from comment #2)
> > rdisc: make NMRDisc namespace aware
> 
>  typedef struct {
>         GObject parent;
> 
> +       NMPlatform *_platform;
> +       NMPNetns *_netns;
> 
>         int ifindex;
>         char *ifname;
> 
> Nitpick: naming is different from other members (leading underscore), I
> don't know if it's on purpose.
> Otherwise LGTM.

It's kinda on purpose, because these members should not be used directly (there are accessor functions, like nm_rdisc_get_netns().


Merged to master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=7037e0b37411cf25ff0af94f1aa7b868a1398bd7