This got broken at some point. The intent of ignore-carrier was always
to ignore the carrier for IP configuration for static/manual connections,
but never for DHCP/SLAAC where a link is actually required. Thus
when checking whether to postpone IP configuration for a master interface
that's using DHCP/SLAAC, don't allow ignore-carrier to factor into
the decision.
If IPv4 configuration did not succeed or the device has no IPv4 addresses
when NM restarts, it will detect the existing device configuration as
'disabled'. This can happen when a bridge has no slaves and thus cannot
perform IPv4 addressing because it has no carrier (since bridge carrier
status depends on slave carriers). When NM starts or restarts, it
sees the bridge has no IPv4 address and assumes the IPv4 method is
'disabled'. This creates a new connection, which blocks any slave
connections from activating if they specify their master via UUID
(since the bridge's active connection is generated).
Fix this by allowing matches from 'disabled' to 'auto' if the device
has no carrier, and there are no other differences between the
original and the candidate connections.
Dependencies may fail before the activation actually starts, like
when a software device gets removed while the activation is
scheduled but before it has started. In these cases, the
activation request should fail.
With some upcoming changes, ActiveConnection objects could change to
DEACTIVATED state during activation, for example if the AC's device
was removed while the AC was being authorized.
To ensure the AC stays alive and is not used after being freed,
keep a reference to the AC across authorization operations.
Also assert inside of sysctl_get() that we read the expected file
locations. Especially because now we might log the content of these
files.
Signed-off-by: Thomas Haller <thaller@redhat.com>
We don't thoroughly log the pointer values of our libnl objects,
so the logging in check_cache_items() is not usefull, it only
clutters the logfile.
Signed-off-by: Thomas Haller <thaller@redhat.com>
Enhance the device plugin interface and convert ATM, BT, and WWAN to
use it. This saves 15% of the binary size of the core NM binary, and
packagers or users can decide which plugins they would like to install,
thereby saving disk space and memory.
https://bugzilla.gnome.org/show_bug.cgi?id=724324
Add a generic signal that devices can use to indicate that something
material in the network situation changed, and that auto-activation
may now be possible. This reduces specific knowledge of device types
in the policy.
Make WWAN support a plugin using the new device factory interface.
Provides a 5% size reduction in the core NM binary.
Before After
NM: 1187224 1125208 (-5%)
MM: 0 100576
(all results from stripped files)
Make Bluetooth support a plugin using the new device factory interface.
Provides a 5% size reduction in the core NM binary.
Before After
NM: 1253016 1187224 (-5%)
BT: 0 85752
(all results from stripped files)
Make ADSL support a plugin using the new device factory interface.
Provides a 1% size reduction in the core NM binary.
Before After
NM: 1265336 1253016 (-1%)
ATM: 0 27360
(all results from stripped files)
In preparation for making WWAN and Bluetooth plugins, rework
the device plugin interface to meet those plugins' needs and
port WiMAX over in the process.
Instead of having NMManager listen directly to the ModemManager
for modem removal signals, have the NMDeviceModem and NMDeviceBt
listen for them (since they obviously have a pointer to the backing
NMModem object) and then re-emit any necessary device removal
signals to the manager.
In reality the connection provider (NMSettings) is always the same
object, and some device plugins need access to it. Instead of
cluttering up the device plugin API by passing the provider into
every plugin regardless of whether the plugin needs it, create
a getter function.
The OLPC mesh code did rely on nm_manager_get() referencing the
singleton when returning it, but all other callers of nm_manager_get()
did not. Thus the manager's refcount would always increase and
almost never decrease. Fix the refcounting so that the manager
always has only one ref, and it's lifetime is controlled by
main() and nothing else.
nmcli con modify my-profile ipv4.addr " "
nmcli con modify my-profile ipv6.addr " "
Note:
Empty string should be used to remove IPs, and 'method' might be needed to set
to 'auto' simultaneously, as well.
$ nmcli con modify profile1 ipv4.addr "" ipv4.method auto
https://bugzilla.redhat.com/show_bug.cgi?id=1071394
The --help option (or its aliases -help/help) is only allowed at as
first argument. Fix completion to account for this.
Signed-off-by: Thomas Haller <thaller@redhat.com>
It works both in 'nmcli con modify' and 'nmcli con edit'.
The following properties are supported (all container-type properties except
properties with option names):
ipv4.dns
ipv4.dns-searches
ipv4.addresses
ipv4.routes
ipv6.dns
ipv6.dns-searches
ipv6.addresses
ipv6.routes
802-1x.eap
802-1x.altsubject-matches
802-1x.phase2-altsubject-matches
connection.permissions
connection.secondary
802-3-ethernet.mac-address-blacklist
802-11-wireless.mac-address-blacklist
802-11-wireless-security.proto
802-11-wireless-security.pairwise
802-11-wireless-security.group
vlan.ingress-priority-map
vlan.egress-priority-map
nm_setting_wired_remove_mac_blacklist_item_by_value()
Also add missing function nm_setting_wired_clear_mac_blacklist_items() and notify
about mac-address-blacklist changes.