When we want to change the zone an interface belongs to
we can't use firewalld's addInterface() because this one
doesn't allow to add interface to zone when it already
has been part of some other/same zone.
We need to use changeZone() method instead - hopefuly
this is the final name of this method.
Drop --strict-order; dnsmasq is intelligent enough to ask nameservers in
an order that makes the best of possibly slow nameservers (or broken ones),
and interrogating them in strict order breaks this.
Add --no-hosts: by default dnsmasq will read /etc/hosts as a list of things
to resolve statically; this is something we want to avoid as nsswitch.conf
already lists files as the first data store to look at; where the entries
in /etc/hosts will already have been returned if that's what the user wants
to see. If the /etc/hosts file then changes, dnsmasq would have to be restarted
before the user would get the new value resolved externally. Avoid this, let
/etc/hosts override DNS entries normally through the resolver and show
changes as soon as the file is updated.
Otherwise if another connection was subsequently activated on a
bond interface, and didn't specify all options, ones set for the
previous connection could stay set for the new connection.
We already have the master device kept in the active connection, so
we can just use that instead of having the Policy determine and set
it manually. This also should allow slaves to auto-activate their
master connections if the master is able to activate.
Virtual devices that we might create when their slave is started
(like bonds) have a virtual carrier that often isn't set on when
until the device is brought up. The device is brought up during
creation, but the initial carrier check happens before the device
is up, so the initial carrier state from the constructor isn't
quite accurate in some cases.
Since we want to use virtual interfaces that we create right after
we create them, we want them to be available too, and that usually
requires the carrier to be on. So recheck the carrier right after
bringing the interface up, so that the carrier state is accurate
immediately after the device is created.
Track a master active connection and emit wait/ready/fail when
it changes state. This signal is intended for devices to
delay their activation until a master device is ready.
This function used to be used only from activation paths, so it
was fine to assert there because we always expected that there
would be an activation request. These days we'd like to use it
in more places, so just return NULL if there's no connection.
They are the basic class that tracks active connections, and we're
going to use them for connection dependencies. So use the fact that
both NMVPNConnection and NMActRequest have the same base class
instead of using object paths.
Many different interface types can support VLANs, including
Infiniband, WiFi, etc. So we have to create a new device class
for them instead of keeping the support in NMDeviceEthernet.
We'll want to eventually match (for VLAN) a given hardware address
that's not the device's hardware address. Only the device itself
knows which NMSetting should contain it's hardware address (ie
the 'wired' setting for NMDeviceEthernet, 'infiniband' for
NMDeviceInfiniband, etc) and VLANs take their hardware address
from the parent interface. So eventually we'll have VLAN
interfaces use these new arguments to ask their parent interface
to match the VLAN hardware address in a connection, since the
VLAN doesn't know (or need to know) what kind of interface it
really is underneath.
Add some testcases checking for DEVICE/PHYSDEV/VLAN_ID variations,
and read/write the new VLAN_ID tag, which we can use in
combination with the 'parent' property to determine the interface
name if no interface name/DEVICE is given.
For bonding-master:
TYPE=bond
BONDING_MASTER=yes
DEVICE=<NAME>
BONDING_OPTS="..."
For bonding-slaves:
MASTER=<NAME>
v2: Resolved test failures after feedback from Jirka.
Signed-off-by: Thomas Graf <tgraf@redhat.com>
We want to start the connectivity checks when any device gets
activated, and stop them when all devices get deactivated. We
also want to make sure it's running if a device gets deactivated
but other devices are still active. If multiple devices are
activated and if the default device gets deactivated, the other
device may become the default device and we'll need a connectivity
check for that device since we can't do per-device checks yet.
Also, if connectivity checking is enabled at compile-time but
not enabled at runtime, the connectivity bits should always
report "connected" to preserve previous behavior, and this code
makes it clearer how that is handled.
We can just use property notifications instead of having
a separate connected signal. Also clean up some formatting
and make some private variable names shorter.
* use libsoup to compare a http response from a given
uri with a given response (use g_str_has_prefix () to compare)
* do periodically check the connectivity. Check interval is configurable
* check connectivity when device state change
from/to NM_DEVICE_STATE_ACTIVATED
- changes nm_utils_get_proc_sys_net_value() to allow all values, not just 0,1
- adds nm_utils_get_proc_sys_net_value_with_bounds() for limiting valid values
This message was printed:
GLib-GObject-CRITICAL **: g_value_get_string: assertion `G_VALUE_HOLDS_STRING (value)' failed
It showed out it came from g_cclosure_marshal_VOID__STRING() in BSSRemoved signal.
The signal parameter is object path, so use g_cclosure_marshal_VOID__BOXED instead.
Always removing wep_tx_keyidx will cause wpa_supplicant.conf being
written even if nothing has been changed. Now it will be removed only
when wep is not used anymore.
We need to do the same thing as wpa_supplicant's own config file parser
and ignore '#' characters that occur between the first and last '"'
characters in a config file line.
https://bugzilla.gnome.org/show_bug.cgi?id=670381
Check "VLAN=yes" if "TYPE=Vlan" is missing.
They have the same meaning.
This patch is based on NM/vlan branch,
commit 703196fcdb96ad0d4bf8dac572235e65ba02e844
Signed-off-by: Weiping Pan <wpan@redhat.com>