This allows us to package WiMAX separately so you can choose
to install WiMAX or not. For package-based distros you can now
install libnm-device-plugin-wimax.so in a separate package that
links to/requires the Intel WiMAX service instead of having the
main NM package require it and pull it in by default. This
plugin infrastructure will be extended to other device types
as well.
Add an accessor for device rfkill type and use that instead of
GObject properties, and also use that accessor when claiming a
new device instead of checking NM_IS_DEVICE_xxxx(). Allows us
to move one step closer to making WiMAX a plugin.
NetworkManager[815]: merge_ip6_configs: assertion `src != NULL' failed
Calling ip6_config_merge_and_apply() with a NULL src_config is fine
since that's what happens during RA or DHCP lease changes.
Reported by Johannes Sjölund
The RDNSS and DNSSL failure cases wouldn't clear out the idle
handler of a previous success (if that success hadn't fired yet);
it seems pointless to signal success and then immediately fail.
Second, it would cause a dangling GSource if the device was
removed or NM quit at the right time.
The 802.1x password for MS-CHAPv2 can be up to 256 UCS-2 characters,
so we need to validate the password as UTF-8 to make sure we don't
reject valid passwords containing non-ASCII characters
Currently slaves only wait for the master device to be present. This is
insufficient, we want to wait for the master connection to be activated.
Signed-off-by: Thomas Graf <tgraf@redhat.com>
I only install libnl-3.2.3 on my system, and I met an error:
In file included from ../../src/nm-netlink-monitor.h:93:0,
from nm-vpn-connection.c:48:
../../src/nm-netlink-compat.h:210:5: error: "HAVE_LIBNL1" is not defined
../../src/nm-netlink-compat.h:210:20: error: "HAVE_LIBNL2" is not defined
make[5]: *** [libvpn_manager_la-nm-vpn-connection.lo] Error 1
Signed-off-by: Weiping Pan <wpan@redhat.com>
Revert the DEVICE and suffix bits for the connection name; there's
a few problems with this. It adds the DEVICE value for connections
regardless of what type they, even in cases where it's not hugely
useful (ie basic wired). We used to do this, but stopped doing it
because it has zero relevance to a large number of users. Instead,
the UI itself should do this where appropriate. That probably means
that 'nmcli' and other tools should give more information about
the components of a connection (like a slave device's master) and
GUI tools would show that in detailed connection information but
not in the at-a-glance status or tooltips. Second, if more
more advanced users wish this information to show up in the name
they can always set the name themselves, or name the ifcfg file
something like "ifcfg-bond1-slave-of-eth0" too.
nm_utils_hwaddr_ntoa() and nm_utils_hwaddr_aton() are like
ether_ntoa()/ether_aton(), but handle IPoIB too.
nm_utils_hwaddr_atoba() is like _aton() but returns a GByteArray,
since that's what's wanted in many places.
Also remove nm_ether_ntop() and replace uses of it with
nm_utils_hwaddr_ntoa().
We have to send agent-owned secrets to agents via SaveSecrets() D-Bus call for
newly created connections, the same way we do for connection updates.
Without the change secrets aren't saved for new created VPN connections,
only after a connection update.
Based on a patch for iw by Johannes Berg <johannes.berg@intel.com>
This simplifies the code quite a bit since we don't need
an nl_cache or nl_family anymore.
genl_ctrl_resolve() is available in libnl1.1, libnl2 and libnl3.
Cc: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Thomas Graf <tgraf@redhat.com>
Moves the logic of naming connections into its own function. Allows each
connection type to provide a "hard" prefix which will always be used.
Bonding uses this to prefix all bonding connections with "Bond".
If a DEVICE= line is available, append it to the end of connection name
for easier identification of the real device behind it.
Appends the suffix "[slave-of <MASTER>]" to all connections which are
configured as a slave of a bond.
Examples:
myName -> myName (eth0)
System eth0 -> System eth0
myName2 -> Bond myName2 (bond0)
System bond0 -> Bond bond0
myName -> myName (eth0) [slave-of bond0]
System eth0 -> System eth0 [slave-of bond0]
Signed-off-by: Thomas Graf <tgraf@redhat.com>
If the device's permanent MAC address is 'locally administered'
(ie, first byte | 0x02 != 0) then we don't want to lock the
connection to the device because it's likely a device that changes
it's MAC every hotplug due to driver bugs or the fact that some
devices don't store their MAC in EEPROM anyway.
If the interface has no IP configuration (bond slave, etc) then
it still needs to get activated too. Previously the code would
only move to ACTIVATED when the first IP method completed, but
since slaves don't do IP config, they never got to ACTIVATED
state.
Adds a new function nm_system_apply_bonding_config() which applies
the parameters specified in the NMSettingBond object via sysfs.
Calls that function after creating/updating the bonding master
device.
If a parameter is not specified in the ifcfg the parameter will be
re-initialized to the default value. This may overwrite changes
which have been done manually via sysfs but it is the only reliable
way of setting up the bond.
Supported parameters for now:
- mode (default: balance-rr)
- miimon (default: 100)
- updelay (default: 0)
- downdelay (default: 0)
- arp_interval (default: 0)
- arp_ip_target (default: none)
Thomas Graf <tgraf@redhat.com>
Kills the strdup() and avoids having the caller free the memory. Also renames
the function to nm_system_get_iface_type() since "link" is not a common term
in NM.
Signed-off-by: Thomas Graf <tgraf@redhat.com>