Commit Graph

8762 Commits

Author SHA1 Message Date
Pavel Šimerda
c64a3b89fc update libgsystem submodule 2013-06-21 17:51:07 +02:00
Tomas Hozza
6b93150d0d dispatcher: publish vpn_ip6_config 2013-06-21 17:46:19 +02:00
Krishna Babu K
c75ad936b5 po: updated Telugu (te) translation (bgo #701982) 2013-06-21 11:19:32 +02:00
Shankar Prasad
ba7c79c964 po: updated Kannada (kn) translation (bgo #701186) 2013-06-21 11:16:12 +02:00
Pavel Šimerda
f625d6a269 platform: handle netlink failures properly 2013-06-21 04:03:41 +02:00
Pavel Šimerda
3b0269bbee platform: add test for address/route cleanup on link removal
The improved tests can be also used to test the previous commit.
2013-06-21 04:03:41 +02:00
Pavel Šimerda
40cb2f4c29 platform: remove cached addresses and routes for deleted devices 2013-06-21 04:02:32 +02:00
Pavel Šimerda
35dd05cc43 platform: share main function among tests 2013-06-21 04:02:32 +02:00
Pavel Šimerda
24dee51bce platform: add tests for default routes
The improved tests can be also used to test the previous commit.
2013-06-21 01:33:02 +02:00
Pavel Šimerda
67731a088e platform: workaround a libnl bug affecting default routes
Current versions of libnl3 use nl_addr_get_len() instead of
nl_addr_get_prefixlen() to determine the default route. Therefore we're
employing a workaround that sets the address length to zero for default
routes.

Unfortunately this workaround causes nl_addr to have wrong address size,
which in turn requires another workaround in init_ip4_route() as well as
init_ip6_route() to cope with the inconsistency.

Even though this solution is very very ugly, we didn't find a better
one. Not calling rtnl_route_set_dst() didn't solve the problem. Thomas
Graf promised to fix the libnl problem upstream. When bumping dependency
to a version that does this correctly, the workarounds can be removed.
2013-06-21 01:28:26 +02:00
Dan Williams
e8c58c957b platform: specify link-added signal as asynchronous
With the move of udev logic into the Linux platform class, the
link-added signals are asynchronous, that is they are not emitted
during the call to nm_platform_*_add(), but after that call has
returned.  The Fake implementation still emitted them synchronously,
which broke the testcases.  Convert the Fake implementation to emit
link-added signals asynchronously and update the testcases to handle
this.
2013-06-20 16:14:08 -05:00
Dan Williams
ed9f6b0843 build: fix distcheck after b294a1ef63 2013-06-20 16:14:08 -05:00
Colin Walters
fe4e11c8d6 autogen: use set -e to propagate errors
Previously we'd just blindly continue if e.g. autoreconf failed.
2013-06-20 16:14:08 -05:00
Colin Walters
805fc3a864 autogen.sh: only set up submodules if we have a .git directory
This way we do the right thing for tarball builds.
2013-06-20 16:14:08 -05:00
Pavel Šimerda
0b07a5301e settings: publish add_new_connection() as nm_settings_add_connection_internal() 2013-06-20 20:20:08 +02:00
Colin Walters
c1d3d3f2e9 device: queuing two transitions to the same state is not an error
Just ignore this, since it happens in the current code and is
harmless.  While we're here, improve the warning in the case where it
does occur to say whiich state we're overwriting.  This should help
debug any future cases.
2013-06-19 18:06:16 -05:00
Dan Williams
c77c566983 core: ignore default routes when creating configuration for generic interface
NM handles the default routes, so they shouldn't show up in the NMIP4Config
for any interface.  They get exposed via the 'default' and 'default6' properties
of the ActiveConnection instead.
2013-06-19 13:49:12 -05:00
Jiří Klimeš
eea23747ce ifcfg-rh: fix storing connections in the hash table
We have to copy the UUID (key) because otherwise the pointer can be invalidated
when the connection is destroyed and problems will start.

The issue showed up as an unability to delete a conenction via D-Bus.

Reproducer:
$ nmcli con add type eth con-name AAA ifname blah
$ nmcli con delete AAA
$ nmcli con add type eth con-name AAA ifname blah
$ nmcli con delete AAA
-- here the connection is not removed from NM
   (even though ifcfg- file) was removed --
2013-06-19 12:41:36 -05:00
Dan Williams
5c705e643a platform: update linux platform testcases for udev/platform merge
Since the platform started using udev for link-added signals, we need
to run the glib mainloop to wait for the udev signals to come in,
instead of expecting them to be emitted immediately.
2013-06-19 12:33:54 -05:00
Dan Williams
7c5bd0c64d platform: fix return value for no-firmware case
The function returns 'gboolean' so it shouldn't be returning an
enum, but it should instead set the platform error and return FALSE.
2013-06-19 12:28:48 -05:00
Pavel Šimerda
b294a1ef63 platform: add minimal Makefile.am for convenience
When working only with nm-platform and its testsuite, it's convenient to
call 'make', 'make check', etc from 'src/platform' directory.
2013-06-19 13:48:29 +02:00
Pavel Šimerda
ed37ceeb91 trivial: platform: add_kernel_object now returns int, not gboolean 2013-06-19 13:28:00 +02:00
Dan Williams
4182deb398 core: remove possibly dangling idle handler in ip6 manager
If things happen just right, where a bond is the first device to use
IPv6 and thus has the only reference to the NMIP6Manager, and the
RTM_NEWROUTE event comes in and triggers manager_request_ip6_info()
but then the device is removed by 'rmmod bonding', the call to
manager_request_ip6_info() could be dangling after the IP6Manager
has been disposed.  Fix that.
2013-06-18 14:41:26 -05:00
Jiří Klimeš
790b3a753c cli: update bash completion file - 'nmcli connection reload' 2013-06-18 15:45:16 +02:00
Dan Williams
caed0243f5 bluetooth: fix crash creating device
Due to the hardware address changes in 77dda53b (danw/hwlen) creating
a new Bluetooth device was crashing.  The changes there assumed that the
NMDeviceBt's hardware address should only be valid when we were connected
to the device, but that's not quite true.  Since we already know the remote
device's Bluetooth hardware address, we already know the hardware address
for the NMDeviceBt as well.
2013-06-17 12:04:54 -05:00
Alban Browaeys
290c51da68 build: out of src build directory fix.
Split srcdir work and builddir work more explicitely,
and fixes a newly introduced issue (git work done out
of the srcdir section).
2013-06-15 01:06:59 +02:00
Dan Williams
c73e891a4c wifi: fix checking AP mode and EAP-FAST support
Classic strcmp() return value thinko.  Oops.
2013-06-14 14:24:19 -05:00
Dan Williams
cf1d2f81f2 core: rename nm_device_hw_* to nm_device_*
Now that we only have one set of is_up/bring_up/take_down functions
lets rename the _hw_ variants.
2013-06-14 13:45:39 -05:00
Dan Williams
4d4a99beaa wimax: hw_bring_up is pointless
The function only checked whether wimax was enabled (rfkill/user pref)
and whether wimaxd was running.  Only nm-device.c calls this function
for WiMAX devices, and the only two uses of it were during activation
(which is already covered by nm-device-wimax.c's is_available() function)
and when the device enters the UNAVAILABLE state, where it is used
to check for missing firmware, which is implemented by the parent
class, not WiMAX.
2013-06-14 13:45:39 -05:00
Dan Williams
17ce00ff27 core: remove bring_up, take_down, is_up device class methods
These turn out to be pretty useless, since their functions are already
covered by each device's state-changed handler or can be done in other
places like deactivate().

https://bugzilla.gnome.org/show_bug.cgi?id=702190
2013-06-14 13:45:32 -05:00
Colin Walters
907d99c2ac Make no-auto-default=* work again
Sadly '*' is a valid interface name, and so the config processing was
thinking it was shorthand for "interface-name:*".
2013-06-14 13:40:27 -03:00
Dan Winship
ac1692a17b keyfile: remove some debugging 2013-06-14 12:57:47 -03:00
Dan Winship
1f81851017 core: add monitor-connection-files=false and ReloadConnections
Add a "monitor-connection-files" config option, which can be set to
"false" to disable automatic reloading of connections on file change.

To go with this, add a new ReloadConnections method on
o.fd.NM.Settings that can be used to manually reload connections, and
add an nm-cli command to call it.
2013-06-14 12:57:47 -03:00
Dan Winship
4b74009b23 settings: don't connect to plugin signals until after initial load
Some plugins may emit :new-connection or :unmanaged-specs-changed
while reading connections, so don't connect to those signals until
after the initial load_connections() (and just unconditionally emit
:unmanaged-specs-changed at that point).

In ifcfg-rh's get_unmanaged_specs(), don't bother to try to read the
connections first; if they haven't been read yet, just return NULL;
NMSettings will call it again after the connections have been read.
2013-06-14 12:57:32 -03:00
Dan Winship
84468ad653 libnm-util: fix alphabetization in libnm-util.ver
to fix "make check"
2013-06-14 12:24:40 -03:00
Pavel Šimerda
54df5f7f79 rdisc: update libndp submodule 2013-06-14 13:17:26 +02:00
Dan Winship
916a427873 man: only remove the man pages in "make clean" if we built them
doing:

  ./configure --disable-gtk-doc
  make clean
  make

from a tarball build (or from a dirty tree that had previously had an
--enable-gtk-doc build) would fail, because configure would see the
pre-existing man pages and set INSTALL_PREGEN_MANPAGES, but "make
clean" would delete them, and there'd be no rule to regenerate them.
2013-06-13 17:45:52 -03:00
Dan Winship
547f448640 core: initial InfiniBand partition support 2013-06-13 15:56:15 -03:00
Dan Winship
c19da3c71f platform: add support for creating InfiniBand subdevices 2013-06-13 15:56:14 -03:00
Dan Winship
2c13439df1 cli: add support for new InfiniBand properties 2013-06-13 15:56:14 -03:00
Dan Winship
cb5606cf1c ifcfg-rh: add support for Infiniband partitions 2013-06-13 15:56:14 -03:00
Dan Winship
6854481fe8 libnm-util: add P_Key support to NMSettingInfiniband
Add p-key and parent properties to NMSettingInfiniband, for specifying
additional interfaces using alternate IPoIB partitions.
2013-06-13 15:52:51 -03:00
Dan Winship
d575381c28 settings: fix unmanaging of InfiniBand devices
ifcfg-rh didn't let you unmanage an InfiniBand device by hardware
address because it was recording the hardware address with uppercase
letters, while nm_match_spec_hwaddr() required lowercase. Fix this by
making nm_match_spec_hwaddr() match case-insensitively (and remove the
manual lowercasing that several other places were doing to work around
this.)

keyfile didn't let you unmanage an InfiniBand device by hardware
address because it only accepted ARPHRD_ETHER hardware addresses. Fix
that by using nm_utils_hwaddr_valid() instead.
2013-06-13 15:52:51 -03:00
Dan Winship
9a73db17d5 libnm-util: add nm_utils_hwaddr_valid() 2013-06-13 15:52:51 -03:00
Dan Winship
bc1a764e1a platform: fix recognition of InfiniBand devices 2013-06-13 15:52:50 -03:00
Dan Winship
c347ac2123 build: allow building against system libndp 2013-06-13 10:24:01 -03:00
Dan Winship
c89acbdc8f build: don't install libndp 2013-06-13 10:24:01 -03:00
Jiří Klimeš
a91eafdf95 cli: 'con add': make ifname mandatory (except bond,bridge,vlan) (bgo #698113)
Optional 'ifname' allowed creating connection applicable to all interfaces,
which was confusing for some users. Now we require the user to provide ifname
to lock the connection for an interface. An "unbound" connection can be
created with ifname "*".

$ nmcli connection add type eth ifname eth0

$ nmcli connection add type eth
now becomes
$ nmcli connection add type eth ifname "*"

bond, bridge:
- when ifname is not specified or is "*",
  interface name is generated (nm-bond, nm-bridge)
vlan:
- when ifname is not specified or is "*",
  vlan device is named "dev.id"

Note: the quotes around * are required to suppress shell expansion.
2013-06-13 10:29:22 +02:00
Jiří Klimeš
88d9db0cdb libnm-util: make some error messages clearer
The 'setting' gerund could be confused with 'setting' as a NMSetting.
2013-06-13 10:05:18 +02:00
Jiří Klimeš
816ac9ee70 libnm-util: prefix errors with 'setting.property' instead of 'property' only 2013-06-13 10:05:18 +02:00