Commit Graph

8762 Commits

Author SHA1 Message Date
Pavel Šimerda
2e826b152d keyfile: cleanup IPv4/IPv6 address reading code 2012-11-07 16:39:53 +01:00
Jiří Klimeš
ffd29e69f3 man: document new log domains (BOND, VLAN) and (ALL, DHCP, IP) 2012-11-07 14:26:08 +01:00
Jiří Klimeš
1eb9c5e352 logging: add "VLAN" log domain 2012-11-07 13:58:47 +01:00
Jiří Klimeš
8437b07581 logging: add "BOND" log domain 2012-11-07 13:58:47 +01:00
Jiří Klimeš
8fbd24c9b4 logging: add new combined log domains
ALL  - for setting all log domains
DHCP - for DHCP4 combined with DHCP6
IP   - for IP4 combined with IP6
2012-11-07 13:58:47 +01:00
Jiří Klimeš
9fa1a9b8ae Revert "docs: add PPP interface API to HTML spec"
This reverts commit 2ad6dcf215.

org.freedesktop.NetworkManager.PPP is a private interface between
NM and nm-ppp-plugin and we don't want it in the documentation.
2012-11-07 13:40:24 +01:00
Dan Williams
3f179d74e2 build: decouple systemd session tracking from systemd suspend/resume
New option --with-suspend-resume=[upower|systemd] which defaults
to systemd if you have systemd >= 183 with the inhibit support,
otherwise upower.  Allows you to use systemd session tracking
simultaneously with upower for suspend/resume if you don't have
system >= 183.
2012-11-06 15:10:03 -06:00
Dan Williams
0180f461ef build: clarify systemd-login build flags
systemd gets used for more than just systemd-login.
2012-11-06 14:11:05 -06:00
Jiří Klimeš
2ad6dcf215 docs: add PPP interface API to HTML spec 2012-11-06 15:09:44 +01:00
Jiří Klimeš
2ff378b44b settings: do not emit "REMOVED" signal in do_delete() (bgo #683800)
It is emitted in nm_settings_connection_remove() called by plugins when the
connection was removed.
This prevents the signal from appearing twice on D-Bus.

Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
2012-11-06 14:19:29 +01:00
Pavel Šimerda
d82669d3fd build: unify NetworkManager path handling (some paths are changed)
Use autoconf/automake variables for NetworkManager paths. Use
NetworkManager subdirectory where appropriate.

Files in /var/run (or /run on some distros) are moved into a separate
directory as is usual with other daemons. It makes the filesystem
more readable and file prefixing unnecessary.

/var/run/NetworkManager.pid -> /var/run/NetworkManager/NetworkManager.pid
/var/run/nm-dns-dnsmasq.pid -> /var/run/NetworkManager/dnsmasq.pid
/var/run/nm-dns-dnsmasq.conf -> /var/run/NetworkManager/dnsmasq.conf

The /var/run/NetworkManager directory is created at runtime, if it doesn't
exist.

Note: Path-based security policies like SELinux and AppArmor may need to
be adapted.
2012-11-05 14:01:47 +01:00
Marc Ruiz
811c87f8ae typo: replace all misstyped 'seconadary' strings with 'secondary' 2012-11-04 23:08:02 +01:00
Dan Winship
a7eb347655 ifcfg-rh: /etc/hostname should override /etc/sysconfig/network
When determining the system hostname, /etc/hostname should override
/etc/sysconfig/network, so monitor both files.

When setting the hostname, set it in /etc/hostname, and delete the
/etc/sysconfig/network HOSTNAME entry if present.

https://bugzilla.redhat.com/show_bug.cgi?id=831735
2012-11-02 11:20:31 -04:00
Pavel Šimerda
00f1d251b4 trivial: remove obsolete HAVE_SELINUX conditional sections
This macro is not defined by the build system.
2012-11-02 01:27:34 +01:00
Jiří Klimeš
8a0e928aed cli/examples: NM_802_11_MODE_AP mode is not valid for NMAccessPoint objects 2012-11-01 15:40:27 +01:00
Jiří Klimeš
a44d36e628 wifi: fix AP mode check in nm_ap_check_compatible()
AP can only be compatible with "ap"-mode connection when both mode is INFRA and
hotspot flag is set.
2012-11-01 14:52:14 +01:00
Jiří Klimeš
aa8c3d72d6 wifi: fix wifi device 'mode' property for AP mode 2012-11-01 14:52:14 +01:00
Pavel Šimerda
5980cae149 distro: fix configure error affecting SUSE netconfig support
Configure now doesn't complain about too many arguments to test.

Bug introduced in my commit:
71e5437: distro: add --with-netconfig option for SUSE
2012-11-01 13:27:44 +01:00
Jiří Klimeš
eeb19fe216 keyfile: don't rename system connection files (bgo #682570)
When updating connections, it is less confusing to reuse the existing file
instead of renaming files according to connection's ID. That reduces surprises
of moving connection files when a connection is edited.
2012-11-01 11:59:00 +01:00
Colin Walters
ceba6bf4c5 build: target GLib 2.34 (bgo #687218)
By specifying GLIB_VERSION_MAX_ALLOWED=GLIB_2_34, we tell GLib not to
warn us about e.g. g_type_init() being deprecated in 2.36.

This avoids the NM build blowing up with the default -Werror
configuration if we happen to have a newer GLib in the buildroot.
2012-10-31 22:01:36 +01:00
Colin Walters
1977fb6c49 build: clean up GLib-related pkg-config usage (bgo #687218)
We had separate checks for glib-2.0, gobject-2.0, gmodule-2.0, and
gio-unix-2.0.  It doesn't make sense to link a binary against all 4
because gio-unix-2.0 depends on glib-2.0 and gobject-2.0.  Doing this
actually breaks things in unusual circumstances.

Generally, few bits of NM actually just use glib, and not gio.  We
might as well coalesce those requirements together, even if it means
in some cases we "overlink".  Additionally, I chose for now to fold
gmodule-2.0 in as well, even though many fewer programs need it.  The
cost of overlinking is quite small.

The benefit of this is less repeated junk in Makefile.am, as well as
more centralized control over GLib.  A followup patch will allow us to
set -DGLIB_VERSION_MIN_REQUIRED in just one place, rather than having
to replicate it 4 times.

The NM configure is still suboptimal - for example, libpolkit-1
depends on gio-2.0, so really we should determine the compiler flags
all in one pass.  But it doesn't matter too much for now.
2012-10-31 21:08:18 +01:00
Colin Walters
59f2cd0f8d build: remove G_DISABLE_DEPRECATED
This functionality is (mostly) obsoleted by the newer
GLIB_VERSION_MIN_REQUIRED and GLIB_VERSION_MAX_ALLOWED defines.  With
this, your build doesn't all of a sudden blow up if we deprecate
something in GLib - you have to explicitly opt-in to the newer
version.

G_DISABLE_DEPRECATED does still apply for macros and things that can't
take __attribute__((deprecated)), but it's not really worth the pain
and cargo culting around just for that.
2012-10-31 19:41:07 +01:00
Jiří Klimeš
462d04bbbb man: add missing log domains (INFINIBAND, FIREWALL, ADSL) 2012-10-31 16:13:07 +01:00
Aleksander Morgado
6853518852 manager: trivial fix in object type in signal callback 2012-10-30 18:34:26 -05:00
Aleksander Morgado
fb9ece78c4 modem-manager: fix several code alignment issues 2012-10-30 18:34:26 -05:00
Aleksander Morgado
6e8b3dadea modem-manager, gsm, cdma: remove 'signal_quality' callback definitions
They are nowhere used.
2012-10-30 18:34:26 -05:00
Aleksander Morgado
7314e37061 modem-manager, gsm: keep the "Connect" DBus call handler around
So that the call gets properly cancelled when deactivating.
2012-10-30 18:34:26 -05:00
Aleksander Morgado
a8f7a45e3f modem-manager: rework interface related properties in `NMModem'
The logic behind the `iface' property (which actually is removed) gets split
into three new properties, as follows::

 * `uid': Just defines a new string property which must contain a unique ID of
    the modem, mainly for logging.

 * `control-port': a string property defining which is the control port the
    modem uses. This property is actually optional and may be specified as NULL.
    The main purpose of this property is to allow the easy integration of the
    new ModemManager into the `NMDeviceBt' object. The bluetooth device needs
    to know the port used by the modem; and we cannot use the Data port
    information as that is only available until the bearer is created. Instead,
    for the new ModemManager we will use the control port information exposed.

 * `data-port': a string property defining which is the data port to use in the
    connection. This property is always defined in the `NMModemGsm' and
    `NMModemCdma' objects.
2012-10-30 18:34:26 -05:00
Aleksander Morgado
1f0dbd6790 modem-manager: let the `NMDeviceModem' handle hw_is_up() and hw_bring_up()
These actions don't require anything from the `NMModem' object, so just move
them back to `NMDeviceModem'.
2012-10-30 18:24:28 -05:00
Aleksander Morgado
24b6fc9e62 modem-manager: switch the state' property from NMModem' into just `connected'
We don't want to depend in the `NMModem' interface on an enumeration which is
very specific to the old ModemManager interface, so we'll just skip exposing it
and instead we'll just give a new boolean property which tells whether the modem
is connected or not (which was at the end the whole purpose of the `state'
property).
2012-10-30 18:24:25 -05:00
Aleksander Morgado
f98ef0fdc4 modem-manager: remove the device' property from NMModem'
This property is not really used anywhere; so pointless to have it around.

Also, we already make sure in `NMModemManager' that the so called 'master'
device is valid and exists.
2012-10-30 18:24:21 -05:00
Aleksander Morgado
1eca1b2648 modem-manager: split the `NMModem' object
The `NMModem' object is split into two objects now:

 * The new `NMModemGeneric' object contains all the implementation specific to
   the old ModemManager interface.

 * The `NMModem' object keeps all the generic stuff; e.g. it doesn't even depend
   on dbus-glib for anything. Several properties in `NMModem' are also now set
   as non-construct-only, as we know that the new ModemManager only knows some
   of the stuff once a bearer has been created, not once a modem is available.

See src/modem-manager/README for more information.
2012-10-30 18:24:17 -05:00
Colin Walters
77264eb682 build: various srcdir != builddir fixes 2012-10-30 12:24:26 -05:00
Pavel Šimerda
012c5f4b27 distro: replace --with-distro with feature-based options (bgo #663602)
Distribution-specific builds are now handled by feature and not by
distro. This allows you to fine-tune the options to your liking and
also allowed us to reduce the number of specific values.

The default values of these options are still derived from *-version
and *-release files in /etc.

The following five distribution-specific features are now available
(and default on distributions in parenthesis):

  --enable-ifcfg-rh (Fedora, RHEL and Mandriva)
  --enable-ifcfg-suse (SUSE)
  --enable-ifupdown (Debian and Ubuntu)
  --enable-ifnet (Gentoo)
  --with-netconfig (SUSE)

Since --with-distro is now removed, there is nothing to prevent generic
builds. If you build on an unknown distribution, all of the features
above will be disabled by default.
2012-10-30 00:36:05 +01:00
Pavel Šimerda
3ee36a6f74 distro: don't install initscripts
It doesn't make much sense to install initscripts in current distributions. Most
of them either don't use initscripts at all, locally patch the initscripts or
supply their own. This allows us to eventually drop the --with-distro configure
option.

Many current distributions support multiple init systems and it doesn't make
sense for upstream to make the choice for them. Distributors can still make
their scripts copy one of the initscripts from the source tree if they wish so.
2012-10-30 00:36:04 +01:00
Pavel Šimerda
71e5437f18 distro: add --with-netconfig option for SUSE
NetworkManager can use resolvconf and netconfig as alternatives
to direct modifications to /etc/resolv.conf. You can now choose
whether to build with netconfig or not.

The default is --with-netconfig=yes on SUSE and --with-netconfig=no
on other distributions. Default --with-resolvconf=no still applies
on any distribution.
2012-10-30 00:35:57 +01:00
Dan Williams
38e3819b4e libnm-util: clean up setting registration
Make setting type registration less icky; instead of having the
connection register all the settings, have the settings themselves
register that information at library load time.  Putting this sort
of thing in G_DEFINE_TYPE_WITH_CODE is apparently more standard
than the home-rolled stuff we had before.  Also document the
priority stuff so when adding new settings, people know what
priority to use.

(cleanups by jklimes)
2012-10-29 15:12:58 -05:00
Alberto Ruiz
1277f9986c docs: clarify the connection ownership in secret agent callbacks (bgo #686915) 2012-10-29 11:00:59 +01:00
Alberto Ruiz
80734d67f3 docs: fix introspection annotation for secret agent callbacks (bgo #686915) 2012-10-29 11:00:42 +01:00
Dan Williams
9818415ad7 docs: add Since tag for nm_device_bond_get_slaves() 2012-10-26 13:04:46 -05:00
Dan Williams
e3c1b60055 libnm-glib: bump soname for new bond symbols 2012-10-26 13:04:38 -05:00
Dan Williams
b8e7e50c80 olpc: ensure correct teardown of mesh device and companion wifi
If the mesh device gets removed first, ensure it cleans up its
signal handlers so they don't get called when the wifi device
is removed.  Fixes warnings on NM shutdown where the mesh device
object could be used after being freed.
2012-10-25 14:23:50 -05:00
Yuri Myasoedov
b987bfdb8d po: updated Russian (ru) translation (bgo #686726) 2012-10-24 10:41:05 +02:00
Colin Walters
fed48417c3 Revert "core: import libgsystem, use it for local-allocations in main.c (bgo #685440)"
This reverts commit 89623b99c4 pending
further discussion.

See: https://mail.gnome.org/archives/networkmanager-list/2012-October/msg00065.html
2012-10-23 16:40:46 -05:00
Jiří Klimeš
16edfae11a cli: add VLAN section to 'nmcli dev list' for VLAN devices
Now, it just contains one item - ID showing VLAN ID of the device.
2012-10-22 15:18:34 +02:00
Jiří Klimeš
65fc99911d cli: add BOND section to 'nmcli dev list' for bond devices
Now, it just contains one item - SLAVES listing all slave devices of the bond
device.
2012-10-22 14:31:11 +02:00
Dan Winship
ad74379c2c core, libnm-glib: expose "slaves" property on NMDeviceBond
https://bugzilla.gnome.org/show_bug.cgi?id=686367
2012-10-19 12:09:27 -04:00
Matej Urbančič
439fefd295 po: updated Slovenian (sl) translation (bgo #686428) 2012-10-19 15:04:30 +02:00
Jiří Klimeš
f1bb254b4b core: use IN6_IS_ADDR_UNSPECIFIED() macro to test against ::
That expresses the intention more explicitly and simplifies the code a bit.
Also, the g_assert (gw_addr) is not necessary any more.
2012-10-18 11:18:59 +02:00
Dan Williams
3d9d70822c core: fix routing crash with WWAN/PTP configurations
Some configurations won't have a gateway address, because they
are point-to-point (/32).  The previous code expected one and
asserted if a gateway was not found; but even without the
assertion, other code expected a non-NULL gateway.  Handle that
by defaulting the gateway to 0.0.0.0 (IPv4) or :: (IPv6) and
override that with a better gateway if we have one, otherwise
just use 0.0.0.0/:: since we already know the IP config we're
settings should be the default one.
2012-10-18 11:18:51 +02:00