settings: add unrecognized-specs, implement in ifcfg-rh

System Internals / NetworkManager - Dan Winship [gnome.org] - 1 November 2013 12:04 UTC

In Fedora, OVS ports are now identified in ifcfg files as "TYPE=OVSPort", which NM doesn't recognize, and so it would ignore those ifcfg files. Unfortunately, this meant that if auto-default wasn't disabled, and there was no other configuration defined for the device, then NM would create an NMDefaultWiredConnection for it and screw things up.

So, add an "unrecognized-specs" settings plugin property, which allows a plugin to indicate to NetworkManager that it knows of some non-NetworkManager-supported connection defined for a device. This will suppress default-wired connection creation for that device, similar to the "no-auto-default" config file option, but determined by the plugin instead of by manual configuration. Devices listed in unrecognized-specs may still be managed by NetworkManager, unless they are also listed in unmanaged-specs.

https://bugzilla.redhat.com/show_bug.cgi?id=1022256

e213707 settings: add unrecognized-specs, implement in ifcfg-rh
src/settings/nm-settings.c | 65 +++++++-----
src/settings/nm-system-config-interface.c | 18 ++++
src/settings/nm-system-config-interface.h | 30 +++---
.../plugins/ifcfg-rh/nm-ifcfg-connection.c | 59 ++++++++---
.../plugins/ifcfg-rh/nm-ifcfg-connection.h | 4 +-
src/settings/plugins/ifcfg-rh/plugin.c | 104 +++++++++++++-------
src/settings/plugins/ifcfg-rh/reader.c | 69 +++++++------
src/settings/plugins/ifcfg-rh/reader.h | 2 +-
.../ifcfg-rh/tests/network-scripts/Makefile.am | 1 +
.../tests/network-scripts/ifcfg-test-unrecognized | 7 ++
.../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 46 +++++++--
11 files changed, 288 insertions(+), 117 deletions(-)

Upstream: cgit.freedesktop.org


  • Share