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 707276 - ifupdown plugin does not support the source stanza [patch included]
ifupdown plugin does not support the source stanza [patch included]
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: Distro-specific
0.9.8
Other Linux
: Normal normal
: ---
Assigned To: Thomas Haller
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-09-02 10:16 UTC by Michael Schaller
Modified: 2013-09-05 09:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to support the ifupdown source stanza (6.33 KB, patch)
2013-09-02 10:18 UTC, Michael Schaller
none Details | Review

Description Michael Schaller 2013-09-02 10:16:34 UTC
Since Debian 7 (Wheezy) / Ubuntu 11.04 (Natty Narwhal) ifupdown supports the source stanza to source in other configuration files from /etc/network/interfaces.

Network Manager's ifupdown plugin does not support the source stanza and thus network interfaces configured via ifupdown that aren't defined in /etc/network/interfaces itself aren't ignored by Network Manager.

I've written a patch to add support for the source stanza to the ifupdown plugin and tested it against Network Manager 0.9.8.2. The patch also includes one test for the new code.

Credits also go to Sebastian Harl <tokkee@debian.org> for reviewing the patch.
Comment 1 Michael Schaller 2013-09-02 10:18:17 UTC
Created attachment 253820 [details] [review]
Patch to support the ifupdown source stanza
Comment 2 Thomas Haller 2013-09-04 16:18:50 UTC
Hi,

Thank you for the patch!!

It is ready for review at http://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=thaller/bgo-707276-ifupdown-source-stanza

Note, that the first commit is your patch plus a minor tweak so that it applied to current master. In the second commit I modified it to make use of glib functions.

Are you ok with it? Especially with the authorship of the git-commit and the "Reviewed-by" flag? (Like the spelling of your name, etc.)


Thomas
Comment 3 Michael Schaller 2013-09-04 16:24:55 UTC
Hi Thomas,

Thanks for the quick review and integration. Looks very good to me. ^^

Best,

Michael
Comment 4 Dan Winship 2013-09-04 17:58:15 UTC
sure, looks good
Comment 5 Jiri Klimes 2013-09-05 07:32:56 UTC
Looks fine. Just two minor things:
*
You could use
abs_path = g_build_filename (en_dir, path, NULL);
instead of
abs_path = g_strdup_printf ("%s/%s", en_dir, path);
*
There are C++ style comments // instead of /**/
But as I see now, there are also on other places in ifupdown plugin, so not a big deal then.