summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* core: add FIXME(release-blocker) comments for match.kernel-command-line behaviorThomas Haller2020-05-122-1/+23
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/431#note_490830
* ovs: enable trace logging not only with NM_MORE_LOGGINGThomas Haller2020-05-081-10/+11
| | | | The logging is useful. Always compile it in.
* all: use "int/char" instead of "gint/gchar" typedefsThomas Haller2020-05-081-2/+2
| | | | This is also recommended by our checkpatch.pl script.
* bridge: refactor definition of options array to use a macro and C99 ↵Thomas Haller2020-05-081-106/+138
| | | | | | | | designated initializer Yes, it's a macro and it's more lines of code. But I think this is much easier to read and to maintain.
* libnm: use boolean values for range of NM_SETTING_BRIDGE_PORT_HAIRPIN_MODE ↵Thomas Haller2020-05-081-1/+1
| | | | in slave_options
* libnm: adjust bridge defines NM_BRIDGE_VLAN_STATS_ENABLED_DEFThomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_MULTICAST_STARTUP_QUERY_INTERVAL_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_MULTICAST_STARTUP_QUERY_COUNT_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_MULTICAST_SNOOPING_DEFThomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERY_USE_IFADDR_DEFThomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERY_RESPONSE_INTERVAL_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERY_INTERVAL_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERIER_DEFThomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_MULTICAST_QUERIER_INTERVAL_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_MULTICAST_MEMBERSHIP_INTERVAL_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_MULTICAST_LAST_MEMBER_COUNT_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_PORT_PATH_COST_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_PORT_PRIORITY_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_PRIORITY_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_MAX_AGE_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_HELLO_TIME_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_STP_DEFThomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_FORWARD_DELAY_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_AGEING_TIME_*Thomas Haller2020-05-081-1/+1
|
* libnm: adjust bridge defines NM_BRIDGE_MULTICAST_HASH_MAX_*Thomas Haller2020-05-081-1/+1
|
* ifcfg-rh/trivial: rename variable i in write_bridge_*setting() to indicate ↵Thomas Haller2020-05-081-35/+35
| | | | integer type
* ifcfg: refactor GObject accessors in write_bridge_setting()Thomas Haller2020-05-081-62/+29
|
* device: use NM_G_PARAM_SPEC_GET_DEFAULT_*() in NMDeviceBridge's commit_option()Thomas Haller2020-05-081-7/+4
|
* acd: fix char buffer argument to _acd_event_to_string_buf()Thomas Haller2020-05-081-1/+1
|
* config: minor cleanup in _sort_groups_cmp() and _intern_config_write_sort_fcn()Thomas Haller2020-05-071-6/+4
|
* config: use nm_streq() and NM_STR_HAS_PREFIX() in "nm-config.c"Thomas Haller2020-05-071-24/+24
| | | | | | | | | - nm_streq() is easier to read. - NM_STR_HAS_PREFIX() works only with string literals, and gets inlined up to one strncmp() call. There is no need to call glib, to determine strlen(prefix) (that we already know), and then to call strncmp().
* config: use NM_STR_HAS_PREFIX_WITH_MORE() instead of duplicate implementationThomas Haller2020-05-072-26/+10
|
* config: use cleanup attribute in read_config()Thomas Haller2020-05-071-17/+16
|
* settings: ensure that "plugins-=ifcfg-rh" works with the default pluginsThomas Haller2020-05-072-8/+19
| | | | | | | | | | | | | On Fedora/RHEL, the default for main.plugins is "ifcfg-rh". You would expect that a single configuration file [main] plugins-=ifcfg-rh would result in an empty list of plugins (which subsequently gets completed with "keyfile"). That didn't happen due to a bug. Fix it.
* config: avoid lgtm.com warning about int bitfield for ↵Thomas Haller2020-05-073-11/+15
| | | | | | | | | | | NMConfigDeviceStateData.nm_owned lgtm.com warns: int nm_owned:3; >> Bit field nm_owned of type int should have explicitly unsigned integral, explicitly signed integral, or enumeration type. So make it a NMTernary instead. It's nicer anyway.
* ndisc: avoid static analysis complaining about overflow check in receive_ra()Thomas Haller2020-05-071-3/+3
| | | | | | | lgtm.com flags this. The check was there to be better safe than sorry. Also, it seems better to have code that shows what happens instead of a verbose code comment (or no comment at all). Anyway, avoid the false positive.
* acd: avoid alloca() inside an unbounded loopThomas Haller2020-05-071-2/+16
|
* device: fix compilation error "--without-more-asserts"Thomas Haller2020-05-071-2/+2
| | | | | | | | | | Defining the name "dispose" breaks object_class->dispose = dispose; below. Fixes: fdba9200c0c0 ('device: avoid coverity warning about unused variable')
* ifcfg-rh: check return value of fdopen()Beniamino Galvani2020-05-071-0/+7
| | | | | | | | | | Reported by coverity: >>> CID 210222: Null pointer dereferences (NULL_RETURNS) >>> Dereferencing a pointer that might be "NULL" "f" when calling "fseek". Fixes: ac5206aa9c5a ('2007-11-21')
* device: style fixesth/af/settings-add-matchesThomas Haller2020-05-061-23/+28
|
* device: handle match.driver also with unknown device driverThomas Haller2020-05-061-11/+7
| | | | | | If the driver is unknown, that doesn't necessarily mean that the match passes. Instead, the match passes if there is no positive match that asks for the driver name.
* core: accept %NULL argument to nm_wildcard_match_check()Thomas Haller2020-05-061-5/+9
| | | | | | | | | %NULL means that the string is unknown. The pattern should still match if there are no positive matches that want to match against the string. For example, the nm_device_get_driver() might return NULL. If we have a match.driver setting, we still need to handle that somehow that it makes sense.
* ifcfg-rh: minor cleanup of make_match_setting()Thomas Haller2020-05-061-11/+11
|
* ifcfg-rh: refactor write_match_setting()Thomas Haller2020-05-061-50/+18
| | | | | | | | | | | | | | | | | - write_match_setting() never fails. Don't let it return a boolean error result. - drop "if (!name || !name[0])" checks. It's not possibly to configure a name %NULL in NMSettingMatch (without triggering assertions). Also, an empty name "" is not valid, so we wouldn't expect it. There is one problem with the way how we concatenate the string list: it uses spaces as separator, while stripping spaces. That means, in the currenty format, an empty token "" cannot be expressed. On the other hand, serializing it would lead to duplicate spaces, that get dropped during re-read. So the empty name wasn't valid from the start, but it also cannot be encoded. - use nm_gstring_add_space_delimiter() and nm_gstring_prepare().
* ifcfg-rh: support new match filtersAdrian Freihofer2020-05-066-14/+72
|
* ifcfg-rh-reader: match refactoringAdrian Freihofer2020-05-061-15/+22
|
* settings: add match for driverAdrian Freihofer2020-05-061-0/+13
| | | | | | Add a new "driver" match option to nm-settings. It allows to disable a network connection configuration if a pattern is found or is not found in the device driver name.
* settings: add match for proc cmdlineAdrian Freihofer2020-05-061-1/+54
| | | | | | Add a new "kernel-command-line" match option to nm-settings. It allows to disable a network connection configuration if a pattern is found or is not found in /proc/cmdline.
* device: avoid coverity warning about unused variableThomas Haller2020-05-062-7/+8
| | | | | | | | | | | | | | | | | This warning is from coverity against 1.18.6. But it applies in a similar manner here. 1. NetworkManager-1.18.6/src/devices/nm-device-macsec.c:811:25: warning: Value stored to 'priv' during its initialization is never read # NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self); # ^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4. NetworkManager-1.18.6/src/devices/nm-device-macsec.c:811:25: note: Value stored to 'priv' during its initialization is never read # NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self); # ^~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 809| { # 810| NMDeviceMacsec *self = NM_DEVICE_MACSEC (object); # 811|-> NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE (self); # 812| # 813| macsec_secrets_cancel (self);