Commit Graph

7740 Commits

Author SHA1 Message Date
Tore Anderson
453f676b2d ip6: accept RAs when forwarding
This patch makes NM set the "accept_ra" sysctl to 1 rather than 2. This
causes the kernel to process RAs even if it configured to forward IPv6
traffic on the interface in question.

IPv6 forwarding would likely be enabled on a host running virtualised
operating systems with virtualised network adapters, for example. This
should not prevent NM from successfully activating IPv6 on a
NM-controlled interface configured with IPv6 mode Auto.
2011-10-03 15:49:15 -05:00
Dan Williams
6c6ec65abe libnm-util: fix deprecated g_value_get_char() for glib 2.29.90 and later 2011-10-03 10:33:49 -05:00
Jiří Klimeš
3e79f06566 trivial: remove unwanted exclamation mark to fix compilation 2011-10-03 15:54:25 +02:00
Jiří Klimeš
dce6a071a8 ifcfg-rh: don't use spaces in ifcfg file names (rh #742273) 2011-10-03 10:30:50 +02:00
Thomas Bechtold
ab7a8fcf98 core: improve config error handling
* better error messages
  * fix memory leak in parse_state_file ()
  * create intermediate parent directories as needed for state file
2011-10-03 00:46:37 -05:00
Dan Williams
06fa29b7bb wifi: add debug logging to new AP merge paths 2011-09-30 13:23:52 -05:00
Dan Williams
fe3151e46e wifi: tweak scanning debug message 2011-09-30 12:59:59 -05:00
Dan Williams
f5d124cd83 core: more verbose message when ignoring certain interface types 2011-09-30 12:50:15 -05:00
Dan Williams
f6aa009712 wifi: rename some AP debug dumping functions 2011-09-30 12:34:17 -05:00
Gary Ching-Pang Lin
339229e4c6 core: improving handling of rfkill (bgo #655773)
This commit improves the handling of rfkill.

- The original two passes check gathers the states of platform
  and non-platform switches in two separate loops. Now we gather
  the both states in one loop and determine the final states later.

- A new rule is used to determine the states of switches.

  if (platform_state == UNBLOCKED)
          choose non_platform_state;
  else
          choose platform_state;

  The state is UNBLOCKED if and only if both the platform and
  non-platform switches are unblocked, so the ambiguous state in
  bgo#655773 will not happen.

  Original code always preferred the platform switch state over
  the device switch state, so if the platform switch was UNBLOCKED
  but the device was BLOCKED, NM would treat the device as
  UNBLOCKED and try to activate it, and obviously fail.
2011-09-30 01:04:18 -05:00
Thomas Graf
00f2b0a9bb core: Include <linux/if.h> instead of <net/if.h>
NM already includes <linux/if.h> in some places, f.e. nm-netlink-monitor and
we can't mix usage of the two. Stick to using <linux/if.h> as it provides
additional flag definitions such as operational link state and link mode.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-09-30 00:18:24 -05:00
Thomas Graf
61099e30f6 configure: Check for libnl-route-3 package
NM not only depends on libnl but also on libnl-route. Therefore check for the
corresponding pkg-config file and use its CFLAGS and LIBS. Otherwise fall
back to using libnl-2 or libnl-1.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-09-30 00:05:53 -05:00
Thomas Graf
fcc128516e configure: Fix typo in libnl3 check
Check for libnl3 sets $have_libnl2 variable instead of $have_libnl3. Mostly a
cosmetic fix since the only usage also has the typo in it.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-09-30 00:05:16 -05:00
Thomas Graf
6764711cc9 configure: Only check for older libnl versions if newer is unavailable
More recent libnl versions can be installed in parallel. Therefore it is
possible for more than one libnl check to pass successful. The way
the #ifdefs are done this results in code for multiple libnl versions
to be included.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-09-30 00:03:07 -05:00
Dan Williams
156f403f31 keyfile: fix confusion about NULL termination for uchar arrays
SSIDs don't want NULL termination, but some of the certificate code
checked for it.  New-style plain strings would never be NULL
terminated (by accident) so fix that and make the code simpler too.

Found by Gary Ching-Pang Lin <chingpang@gmail.com>
2011-09-29 23:52:17 -05:00
Dan Williams
c9119c7599 modem: fix a periodic use-after-free crash poking ModemManager
See https://bugs.freedesktop.org/show_bug.cgi?id=41339 for a backtrace
and more info.
2011-09-29 11:14:48 -05:00
Jiří Klimeš
e189b87406 vpn: fix assertion when getting 'Uuid' property of an active VPN connection 2011-09-29 16:37:12 +02:00
Jiří Klimeš
a4305b3cbe vpn: fix 'SpecificObject' path for active VPN connections on D-Bus
Active VPN connections exported their own active path instead of active path of
base connection in 'SpecificObject' property. It's a regression caused by commit
bc6fc7b910 that split VPN connections to
NMVPNConnectionBase and NMVPNConnection.
Previously, specific object used to be obtained from NMActRequest of parent
connection. The NMActRequest object served also for getting secrets. Commits
0e6a5365d4 and 832e64f8bc
removed NMActRequest from VPN connection because it's not necessary any more.
This commit fixes the issue by passing specific object path explicitly.
2011-09-29 16:09:17 +02:00
Dan Williams
a38032e96c core: split nm_manager_get() to simplify manager creation
OLPC Mesh code now doesn't have to be updated every time we change
the manager's creation arguments.  We could make all these arguments
GObject properties of the manager too, but that's more code and
we'd eventually like to figure out a better solution for letting
non-NMManager code listen for device addition/removal.
2011-09-27 09:40:54 -05:00
Dan Williams
52e96be3c4 core: split out config file handling
Make config file stuff somewhat clearer and easier to understand,
and possibly easier to extend later.
2011-09-27 09:40:50 -05:00
Dan Williams
1f835b0adb core: remove unused arguments from nm_manager_get() 2011-09-27 09:24:36 -05:00
Jiří Klimeš
1c767dd541 fcfg-rh: remove newlines when writing to ifcfg files (CVE-2011-3364) (rh #737338) 2011-09-27 09:26:40 +02:00
Jiří Klimeš
f44959890b ifcfg-rh: change iscsiadm path to /sbin/iscsiadm (rh #740753)
Using SBINDIR appears to be wrong as it expands to /usr/sbin.
2011-09-26 15:51:49 +02:00
Dan Williams
7e96da83e7 wimax: log connection progress information
We don't do anything with it yet, but it's nice to know for debugging.
2011-09-21 00:30:51 -05:00
Dan Williams
e63dc96a8f core: release DHCP lease when requested instead of always 2011-09-21 00:30:38 -05:00
Dan Williams
e39449caef settings: fix leaked connection when deleting secrets 2011-09-20 23:01:35 -05:00
Dan Williams
512a0f827a settings: fix refcounting when deleting a default wired connection (lp:797868)
When a default wired connection is saved, it gets deleted first since it
has to be re-created using a settings plugin.  But with the settings
rework in 0.9, default wired refcounting changed and the default
wired connection wasn't kept alive in default_wired_try_update()
over the removal/readd.  This caused a use-after-free.
2011-09-20 22:44:10 -05:00
Jiří Klimeš
f95d503680 examples: correct a comment in list-devices.py example 2011-09-20 18:13:32 +02:00
Jiří Klimeš
ad4b8777e4 examples: fix list-connections.py to work with 0.9's GetSecrets() API 2011-09-20 18:07:25 +02:00
Dan Williams
d8edf0ec3a release: bump version to 0.9.1.90 (0.9.2-beta1) 2011-09-19 23:18:12 -05:00
Dan Williams
e6b834f217 release: update NEWS 2011-09-19 23:10:59 -05:00
Dan Williams
f082e243c6 ifcfg-rh: fix crash when system bus isn't around 2011-09-19 17:38:58 -05:00
Colin Walters
833bc16d12 build: honor NOCONFIGURE (bgo #659354) 2011-09-19 16:45:43 -05:00
Dan Williams
4ac8b1cf8e wimax: more verbose interface add/remove logging 2011-09-19 16:44:06 -05:00
Jiří Klimeš
60ed3839fb core: print textual description for reason codes on device deactivation too 2011-09-19 14:22:00 +02:00
Dan Williams
e92043c4d5 examples: add python example for listing devices 2011-09-15 11:13:38 -05:00
Evan Broder
1e2984a5c2 supplicant: Don't leak secrets, even if they're probably invalid 2011-09-15 10:17:30 -05:00
Jiří Klimeš
53b85b13be core: storing timestamps also for VPN connections (rh #725353) 2011-09-15 14:24:41 +02:00
Dan Williams
91b93c1352 wifi: remove some dead code 2011-09-14 17:30:04 -05:00
Gerald
61568bc513 ppp: pass novj through to pppd 2011-09-14 12:31:54 -05:00
Thomas Graf
271fce0267 monitor: Use nl_socket_alloc() instead of nl_socket_alloc_cb()
We are using the default cb set anyways. This allows running NM with
the NLCB=debug environment variable set to get some debug messages
out of libnl related to netlink communication.

NLCB=debug won't print received netlink messages as the MSG_IN
handler is in use by NM to verify message origins. It's probably
best to introduce new handlers in libnl for debugging purpose
so both use of MSG_IN and enable debugging is possible.
2011-09-14 12:26:33 -05:00
Thomas Graf
d6864d7cf5 core: Fix check for failure in translating link name to ifindex
rtnl_link_name2i() returns 0 (unspecified ifindex) if translation
did not succeed.
2011-09-14 12:25:35 -05:00
Alfredo Matos
d2069c56e8 netlink: fix flags use in nm_netlink_route_add
Flags are not getting set when a route is added (e.g. NLM_F_REPLACE).
Apparently this was fixed in Ubuntu, but I didn't see a patch here, so
here it is.
2011-09-13 10:40:30 -05:00
Dan Williams
43a6f8a003 netlink: alias nlmsg_datalen() for libnl1 2011-09-13 00:08:30 -05:00
Thomas Graf
74349dcdc3 core: Fix leaks if address parsing fails while setting mac
Both 'old' and 'new' are leaked if nl_addr_build() fails to parse
the mac address.
2011-09-13 00:08:30 -05:00
Thomas Graf
360143e42f core: fix leaked address structure after parsing mac address 2011-09-13 00:08:30 -05:00
Thomas Graf
1134eee1e6 ip6: Perform sanity check before processing prefix messages
Verifies that the provided message consists of at least the prefix header.
2011-09-13 00:08:30 -05:00
Thomas Graf
3f3a63084c ip6: Perform sanity checks before processing nduseropt messages
Verifies that the provided message consists of the nduseropt header
followed by an array of options as specified in the header.
2011-09-13 00:08:30 -05:00
Thomas Graf
205c4c52d8 ip6: Perform sanity check before processing NEWLINK messages
Verifies that provided message consists of at least the link message
header. nlmsg_parse() does this so it needs to be called prior to
accessing the message contents.
2011-09-13 00:08:30 -05:00
Thomas Graf
c297cb8f70 ip6: fix leak in process_addr()
rtnladdr is leaked if nm_ip6_manager_get_device() returns NULL.
2011-09-13 00:08:30 -05:00