Commit Graph

8762 Commits

Author SHA1 Message Date
Dan Williams
4a7c77ac95 dnsmasq: actually kill stale dnsmasq process
Interpret the return value of kill(2) correctly...
2010-10-07 14:07:58 -05:00
Dan Williams
35b1ed9082 dns: actually kill stale dnsmasq process
Interpret the return value of kill(2) correctly...
2010-10-07 14:07:52 -05:00
Dan Williams
8502f0c874 core: fix use-after-free getting user connections
G_SLICE debugging uncovered a use-after-free when freeing the
batched user connection settings callback list.  We don't
actually care about the DBusPendingCalls anyway, so just make
the list a counter and simplify the code in the process.
2010-10-07 13:52:51 -05:00
Dan Williams
03517015cc core: check address family, not route family 2010-10-07 12:09:17 -05:00
Dan Williams
aeeac548a8 dns: fix use-after-free in plugin error path 2010-10-07 12:04:41 -05:00
Dan Williams
82dd97c4b7 policy: ensure stale IP mappings are not left in /etc/hosts (bgo #629020) (rh #630146)
NM-added mappings for active IP addresses were not getting properly
removed when the address disappeared of NM quit, because the bits
of code that determine whether or not /etc/hosts should change were
not taking the disappearance of the IP address into account, and
were leaving the file unchanged.

To fix that, if there is no default IP address, but there are NM-added
IP address entries in /etc/hosts, make sure we update /etc/hosts and
remove them.
2010-10-07 00:29:44 -05:00
Martin Pitt
febb3d2cb4 system-settings: add timestamp to default auto wired connections (bgo #583756) 2010-10-06 17:14:54 -05:00
Martin Pitt
61e86600d5 dhcp: fix uninitialized variable usage with dhcp3 2010-10-06 17:12:10 -05:00
Gabor Kelemen
c35a763c17 po: update Hungarian translation (bgo #631186) 2010-10-06 15:51:53 -05:00
Piotr Drąg
66ef151da1 po: update Polish translation (bgo #631153) 2010-10-06 15:49:16 -05:00
Brett Witherspoon
d18911aabd doc: don't install docs when docs are disabled (bgo #631133) 2010-10-06 15:47:58 -05:00
Dan Williams
516ea8bf12 wifi: simplify supplicant interface signal handling 2010-10-06 15:43:41 -05:00
Dan Williams
f3a1366b55 supplicant: collapse supplicant interface states
We only really need one state for the supplicant interface which
simplifies handling in the Wifi and Wired device classes quite a
bit.  It also simplifies the supplicant interface class too.

One behavioral change in the device classes is not running the
supplicant interface state changes from an idle; we'll have to
see if that causes problems.  ISTR long ago that processing the
state change signals directly caused some issues, but we've
significantly reworked somethings since then so we may be able
to get away with this now.
2010-10-06 11:05:21 -05:00
Dan Williams
4d63f08403 supplicant: reorganize supplicant manager class
Gets rid of prototypes and simplifies the code a bit.
2010-10-05 14:20:23 -05:00
Dan Williams
262db04e20 supplicant: use a GHashTable instead of a GSList for tracking interfaces
It's just less code. Yay.
2010-10-05 14:19:56 -05:00
Dan Williams
71c4e2338b supplicant: simplify supplicant interface object
Move GObject stuff to the bottom to reduce prototype abuse and
remove unneeded prefixes from stuff that's private to the class
itself.  We also don't need the 'supplicant-manager' or 'device'
properties since they weren't used anywhere.
2010-10-05 14:19:43 -05:00
Dan Williams
410c354384 Revert "supplicant: simplify supplicant interface object"
This reverts commit 43b55f719f.
2010-10-05 14:17:53 -05:00
Dan Williams
8738aad6f2 Revert "supplicant: use a GHashTable instead of a GSList for tracking interfaces"
This reverts commit 0e61ddcd27.
2010-10-05 14:17:48 -05:00
Dan Williams
aadc6d6a7e Revert "supplicant: reorganize supplicant manager class"
This reverts commit edd2369eb8.
2010-10-05 14:17:40 -05:00
Dan Williams
edd2369eb8 supplicant: reorganize supplicant manager class
Gets rid of prototypes and simplifies the code a bit.
2010-10-04 23:25:18 -05:00
Dan Williams
0e61ddcd27 supplicant: use a GHashTable instead of a GSList for tracking interfaces
It's just less code. Yay.
2010-10-04 19:42:25 -05:00
Dan Williams
43b55f719f supplicant: simplify supplicant interface object
Move GObject stuff to the bottom to reduce prototype abuse and
remove unneeded prefixes from stuff that's private to the class
itself.  We also don't need the 'supplicant-manager' or 'device'
properties since they weren't used anywhere.
2010-10-04 19:37:17 -05:00
Jiří Klimeš
9ee41307fc examples: add example for adding a connection in C (using glib) 2010-09-30 21:09:01 +02:00
Jiří Klimeš
088454fcab ifcfg-rh: fix assertion failure when IP4 setting is missing while writing connection 2010-09-30 15:13:39 +02:00
Damyan Ivanov
e650b2f23d po: update Bulgarian translation (bgo #630950) 2010-09-29 19:10:25 -05:00
Dan Williams
44cfbf201f wifi: allow proactive_key_caching through the supplicant settings filter (rh #615032) (rh #636877)
This makes 596cf1a232 actually work.
2010-09-28 14:18:34 -05:00
Dan Williams
f62666dbff cli: don't crash if for some reason HW addresses aren't available (bgo #630534) 2010-09-27 16:29:56 -05:00
Jorge González
36795744b7 po: update Spanish translation (bgo #630562) 2010-09-27 14:51:59 -05:00
Dan Williams
8b41f70dd5 Merge remote branch 'origin/master' into rm-userset 2010-09-27 10:30:46 -05:00
Jiří Klimeš
9c0a812d52 man: document usage of * glob in no-auto-default option (NetworkManager.conf) 2010-09-27 13:44:37 +02:00
Pat Suwalski
db3f91deae system-settings: allow glob (*) in no-auto-default config file option
When * is used instead of MAC addresses' list, no-auto-default option
is valid for all interfaces.
2010-09-27 11:08:03 +02:00
Jiří Klimeš
facf6b176f core: add Version property to org.freedesktop.NetworkManager interface 2010-09-27 10:34:56 +02:00
Jiří Klimeš
358261ccd9 core: read initial MAC address on startup; reset to this MAC when disconnecting
Previously, NM reset permanent MAC to an interface while disconnecting. That
basically ignored MAC addresses set before NM started managing the interface.
Now, the initial MAC address is remembered and set back to the interface when
disconnecting.
2010-09-27 09:53:51 +02:00
Dan Williams
b80f31e191 trivial: typo fixes
Sent by a Debian user to Michael Biebl.  No other attribution
information available.  Thanks Debian user!
2010-09-25 00:34:10 -05:00
Dan Williams
6f2aa8a817 ifupdown: return NULL hostname, not a zero-length string 2010-09-24 18:54:37 -05:00
Dan Williams
9e2ec0b7a1 system-settings: fix use-after-free causing crashes when hostname is empty
Should be returning NULL here since the actual hostname is returned in the
for() loop if the plugin supports hostnames.  But if the plugin for some
reason returns an empty string (which they aren't supposed to do) then
hostname would be left assigned to an already-freed value, which was then
returned to higher layers.

==12331== Invalid free() / delete / delete[]
==12331==    at 0x4024B3A: free (vg_replace_malloc.c:366)
==12331==    by 0x448BFC5: g_free (gmem.c:191)
==12331==    by 0x43E0E05: value_free_string (gvaluetypes.c:268)
==12331==    by 0x43DC587: g_value_unset (gvalue.c:276)
==12331==    by 0x80B297F: notify (nm-sysconfig-settings.c:229)
==12331==    by 0x43C64E7: g_cclosure_marshal_VOID__PARAM (gmarshal.c:531)
==12331==    by 0x43B78B8: g_type_class_meta_marshal (gclosure.c:878)
==12331==    by 0x43B9251: g_closure_invoke (gclosure.c:767)
==12331==    by 0x43CD239: signal_emit_unlocked_R (gsignal.c:3178)
==12331==    by 0x43CEDB3: g_signal_emit_valist (gsignal.c:2981)
==12331==    by 0x43CF255: g_signal_emit (gsignal.c:3038)
==12331==    by 0x43BD630: g_object_dispatch_properties_changed (gobject.c:801)
==12331==  Address 0x479f208 is 0 bytes inside a block of size 1 free'd
==12331==    at 0x4024B3A: free (vg_replace_malloc.c:366)
==12331==    by 0x448BFC5: g_free (gmem.c:191)
==12331==    by 0x80B1A08: nm_sysconfig_settings_get_hostname (nm-sysconfig-settings.c:280)
==12331==    by 0x80B27C7: get_property (nm-sysconfig-settings.c:1415)
==12331==    by 0x43BC707: g_object_get_property (gobject.c:935)
==12331==    by 0x80B288D: notify (nm-sysconfig-settings.c:225)
==12331==    by 0x43C64E7: g_cclosure_marshal_VOID__PARAM (gmarshal.c:531)
==12331==    by 0x43B78B8: g_type_class_meta_marshal (gclosure.c:878)
==12331==    by 0x43B9251: g_closure_invoke (gclosure.c:767)
==12331==    by 0x43CD239: signal_emit_unlocked_R (gsignal.c:3178)
==12331==    by 0x43CEDB3: g_signal_emit_valist (gsignal.c:2981)
==12331==    by 0x43CF255: g_signal_emit (gsignal.c:3038)
2010-09-24 18:25:45 -05:00
Dan Williams
596cf1a232 wifi: use PMKSA caching with PEAP-GTC (rh #615032) (rh #636877)
We don't want to require a full 802.1x reauth when using OTP tokens
and roaming between APs in the same ESS, since that takes a long time
(user has to find the token and type in the code).
2010-09-24 14:12:58 -05:00
Jiří Klimeš
b3aa9473c5 cli: add D-Bus object path field for devices (e.g.: nmcli -f device,dbus-path dev status) 2010-09-24 14:38:50 +02:00
Dan Williams
8199c7275b dns: warn that the BIND plugin is experimental
It's still got a bunch of issues that need debugging, like when VPN
nameservers exist but no domain and thus not doing split DNS, sometimes
hosts outside the VPN don't resolve correctly, which was previously
masked by having the non-VPN nameservers in /etc/resolv.conf where
glibc would erroneously use them instead of asking BIND.  To be fixed
in a subsequent patch.

The dnsmasq plugin seems to work great though.
2010-09-22 16:32:00 -05:00
Dan Williams
a211fadce0 Merge remote branch 'origin/cachingdns'
Caching DNS with dnsmasq works well enough to merge for now.  THere
are still some issues with the BIND plugin because BIND is god-awful
unecessarily complex so we'll disable that in a further commit.
2010-09-22 16:19:28 -05:00
Dan Williams
a1731c6064 libnm-util: fix max APN length
It's not 20, it's DNS domain name length.
2010-09-22 13:44:18 -05:00
Dan Williams
0ec9bf2c73 libnm-util: enforce APN character restrictions
APNs can only contain alphanumeric characters, '.', and '-'.  To be
helpful we strip spaces off before setting the APN internally so that
previously (and incorrectly) valid APNs don't cause the whole
connection to fail validation and thus disappear.  The only case seen
in the wild was a Pelephone IL APN which erroneously had a trailing
space in the mobile broadband provider database.  Bad characters
cause the connection to fail with vague error messages about being
unable to activate the PDP context during PPP negotiation.
2010-09-22 13:20:02 -05:00
Jiří Klimeš
5e7b4e7d15 man: update nmcli man page 2010-09-22 14:25:15 +02:00
Jiří Klimeš
b008a48636 cli: add D-Bus object path field for active connections (e.g.: nmcli -f name,uuid,dbus-path con status) 2010-09-22 12:26:44 +02:00
Dan Williams
06bd99f617 dns: write only 127.0.0.1 to resolv.conf when caching
If all nameservers are listed in resolv.conf, glibc apparently
tries them all (even if 'options rotate' isn't specified??).  Leading
to queries for internet hosts being directed to VPN-specific DNS
servers in split-DNS situations.  I've verified this with wireshark;
I see queries going out over the tunnel to VPN nameservers for
non-internal addresses, while BIND itself never logs anything about
queries to VPN nameservers for that same address.  Thus the only
thing left is to blame glibc...
2010-09-21 00:18:15 -05:00
Dan Williams
20acb482c5 dns: allow random source ports for BIND caching DNS
Despite most guides saying that without restricting to port 53 queries
won't get through a firewall, I cannot make it work with this option.
DNS queries through a WRT54G just time out even when the WRT54G isn't
caching anything itself (ie, explicit upstream nameservers are the
forwarders in the bind config).
2010-09-21 00:08:01 -05:00
Dan Williams
14a358f604 core: be more robust to config file syntax issues
Clearly we should be stripping spaces off plugin names if that's what
the user happened to type.
2010-09-20 14:27:06 -05:00
Daniel Schury
cd5d904928 po: update German translation (bgo #630049) 2010-09-20 11:56:09 -05:00
A S Alam
713ee36f09 po: update Punjabi translation (bgo #630034) 2010-09-20 11:54:21 -05:00
Matej Urbančič
e8c467e26a po: update Slovenian translation (bgo #630009) 2010-09-20 11:52:31 -05:00