GNOME Bugzilla – Bug 707276
ifupdown plugin does not support the source stanza [patch included]
Last modified: 2013-09-05 09:03:21 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.
Created attachment 253820 [details] [review] Patch to support the ifupdown source stanza
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
Hi Thomas, Thanks for the quick review and integration. Looks very good to me. ^^ Best, Michael
sure, looks good
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.
thanks for review and comments. I just pushed the two commits to upstream master, see: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=48ed1abca77195ed9b36645593733da143e3be3f http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=4e09b87d5404580ec5a75234fe48d4c6137c4e40