Commit Graph

269 Commits

Author SHA1 Message Date
Jiří Klimeš
da354830da core: build with SELinux; don't break /etc/hostname context (rh #1070829)
https://bugzilla.redhat.com/show_bug.cgi?id=1070829
2014-03-31 17:44:15 +02:00
Dan Winship
a18248dd1b devices: rename "atm" plugin to "adsl", and "bt" to "bluetooth"
The atm/adsl plugin really is a generic ATM plugin but (a) it needs a
bit of work to do IPoATM rather than just PPPoATM and PPPoEoATM, and
(b) most people currently using NM's ATM support are using DSL devices
not actual ATM cards anyway, and have no idea what "ATM" even means.
If we add the necessary IPoATM support later we can rename the plugin
back to -atm
2014-03-19 14:56:47 -04:00
Jiří Klimeš
94d0d30e95 team: read team port config in nm_team_update_slave_connection() (rh #1035859)
Without reading team port config we would fail to assume team slaves.

libteam provides teamdctl_port_config_get_raw_direct() from 1.9 up
See https://bugzilla.redhat.com/show_bug.cgi?id=1028138

https://bugzilla.redhat.com/show_bug.cgi?id=1035859
2014-03-12 10:44:29 +01:00
Dan Williams
aeb1e103d8 mobile: make WWAN support a plugin
Make WWAN support a plugin using the new device factory interface.
Provides a 5% size reduction in the core NM binary.

     Before    After
NM: 1187224  1125208  (-5%)
MM:       0   100576

(all results from stripped files)
2014-03-03 09:32:41 -06:00
Dan Williams
a9591aecaf bluez: make Bluetooth support a plugin
Make Bluetooth support a plugin using the new device factory interface.
Provides a 5% size reduction in the core NM binary.

     Before   After
NM: 1253016 1187224 (-5%)
BT:       0   85752

(all results from stripped files)
2014-03-03 09:32:41 -06:00
Dan Williams
71a52347f3 atm: make ADSL support a plugin
Make ADSL support a plugin using the new device factory interface.
Provides a 1% size reduction in the core NM binary.

      Before    After
NM:  1265336  1253016  (-1%)
ATM:       0    27360

(all results from stripped files)
2014-03-03 09:32:41 -06:00
Thomas Haller
16bbc90c16 release: bump version to 0.9.9.1 (development)
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-02-28 14:21:35 +01:00
Dan Winship
932aa29026 trivial: fix configure.ac comment 2014-02-19 13:43:10 -05:00
Aleksander Morgado
3b76ae18a5 modem-manager: if building systemd support, assume it manages the MM lifecycle
We will not explicitly poke MM to start it if NetworkManager is built with
systemd support.

https://bugzilla.gnome.org/show_bug.cgi?id=703040
2014-02-13 12:06:17 -05:00
Dan Winship
64c5395cb1 build: improve our use of glib's version macros to catch more bugs
We were setting GLIB_VERSION_MAX_ALLOWED to 2.34, since we provide
reimplementations of a few 2.34 functions in nm-glib-compat.h. But
this was turning off warnings for the 2.34+ APIs we *didn't* have
compat versions of too.

Fix this by setting MAX_ALLOWED to 2.32 (same as MIN_REQUIRED), and
defining macros to wrap calls to compat-ified functions and disable
deprecation warnings around them.

This points out several places where we were accidentally using 2.34
APIs without noticing, which need to be fixed now.
2014-02-13 11:24:37 -05:00
Thomas Haller
8da98026da build: include the git commit id of HEAD in ./configure
`make dist` packs the 'configure' file in the tarball, so this is
useful, to include the commit id into the release tarball.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-02-05 17:13:23 +01:00
Dan Winship
dd58d9c703 build: drop the libndp submodule
libndp has existed for a while now. 1.0 was released six months
ago. So drop the submodule and just require an installed package.
2014-02-03 12:13:41 +01:00
Dan Williams
d18f524984 wifi: add nl80211 Critical Protocol indication support
At critical times during the connection process, especially during
DHCP and EAPOL, the driver can increase the reliability of communication
in an attempt to increase the possibility of success.  This could be
done by suppressing bluetooth for a short period, or locking in a low
(and thus more reliable) bitrate, or enforcing some other interference
protection.  The 3.10 kernel added nl80211 support for this, so lets
use it if we can.
2014-01-31 14:11:28 -06:00
Dan Williams
32a001f526 core: allow custom IP address ranges for Shared connections (bgo #675973)
Given an IPv4 address and prefix for a shared config, figure out
the DHCP address range automatically.  To keep things simple we
allow a max of 252 addresses (not including network address,
broadcast address, and the hotspot) no matter what prefix you use,
so if the address is 10.0.10.1, you still only get a range of
10.0.10.2 -> 10.0.10.254.

But we also leave some addresses available above the host address
for static stuff, like we did before.  This is done on a sliding
scale from 0 to 8 addresses, where about 1/10th the number of
available addresses are reserved.

https://bugzilla.gnome.org/show_bug.cgi?id=675973
2014-01-23 16:21:01 -06:00
Jan Alexander Steffens
691422a460 build: add --with-dnsmasq, to specify dnsmasq path
https://bugzilla.gnome.org/show_bug.cgi?id=700219
2014-01-03 14:51:16 -05:00
Dan Winship
dfe194eea6 dns-manager: don't add "public suffix" domains to search (rh #851521)
If the hostname is "foo.example.com" then we want to add
"search example.com" to resolv.conf, but if it's just "example.com",
we don't want to add "search com" (rh #812394).

So if NetworkManager is being built with recent libsoup, use
soup_tld_domain_is_public_suffix() to double-check the domain before
adding it. (If it is not being built with libsoup, or is being built
with too old a version, we just skip that test, keeping the old
behavior.)
2013-12-20 09:31:04 -05:00
Dan Winship
7481c64ad5 systemd: add "Before=network.service" on Fedora/RHEL (rh #1034983)
On Fedora/RHEL, NetworkManager.service needs to be started before
network.service, or else network.service may try to bring up NM's
devices itself.
2013-12-17 09:45:18 -05:00
Dan Winship
3bda3fb60c nmtui: initial import of nmtui
nmtui is a TUI (curses-based Text User Interface) for NetworkManager
2013-12-13 16:00:51 +01:00
Dan Williams
b11aec3f15 dhcp: force IPv4-only for dhcpcd
dhcpcd v5.99 and later automatically enabled IPv6 behavior unless
specifically disabled.  This is undesirable for two reason:

1) dhcpcd sends IPv4 Router Solicitations, which NetworkManager
handles itself, so there's no need to do it twice.  NetworkManager
knows better than dhcpcd whether IPv6 is supposed to be used for
that interface or not.

2) Some devices don't react well to IPv6 when they aren't expecting
it.  For example, older Qualcomm Gobi-based devices will listen
for Router Solicitations and attempt to set up IPv6, but if other
settings are not done correctly, or the firmware doesn't actually
support it, the firmware will then crash.  So simply upgrading your
dhcpcd from 5.x to 6.x magically stops WWAN working for these
devices.
2013-11-27 17:14:32 -06:00
Thomas Haller
044cebade4 build: fix for make distcheck without enable-gtk-doc
Without this patch, the following fails with a rather obscure message
about missing make target.

  ./autogen.sh && make && make distcheck
  ...
  *** No rule to make target `NetworkManager.8', needed by `distdir'. Stop.

Swap the order of the subdirectories 'docs' and 'man' to build
'docs' earlier. This way, `make distcheck` fails in the directory 'docs'
with a better error message:
  *** gtk-doc must be installed and enabled in order to make dist

Also, add 'man/nmcli-examples.5' to the list of files, to determine
whether to use the pre generated doc files.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-11-18 19:19:13 +01:00
Thomas Haller
bf5a6ad443 bluez: enable both BlueZ4 and 5 and select it dynamically at runtime
NMBluezManager is now a proxy and only delegates to either
NMBluez4Manager or NMBluez5Manager. It detects the running BlueZ
version at runtime, and once it decides for one version, it cannot be
changed anymore as long NetworkManager is running.

This means, when switching from BlueZ4 to BlueZ5 or vice versa you have
to restart NetworkManager. This should be acceptable, because it is
not a common use case (most systems won't have both versions installed
anyway) and it greatly simplifies implementation.

Also note that NMBluez4Manager and NMBluez5Manager do not implement a
common interface. NMBluezManager delegates to the correct manager.
Having them share an common interface or base class would not simplify
the code, because NMBluezManager not only delegates, but it also acts as
a proxy until it is decided which BlueZ version is running. So, this
proxy-like behaviour would still be needed. The alternative would be to
merge the functionality of all three NMBluez*Manager classes into one.

This also removes the --enable-bluez4 configure switch, because both
versions are now always enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=709412

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-10-18 19:56:37 +02:00
Dan Williams
961e23a2e2 build: show bluez4 as "no" when not explicitly enabled 2013-09-25 21:01:04 +02:00
Thomas Haller
b246788bc4 config: make BlueZ 5 default and replace --enable-bluez5 with --enable-bluez4
Build now BlueZ 5 by default and rename the configure flag
--enable-bluez5 to --enable-bluez4.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2013-09-25 21:01:04 +02:00
Emilio Pozuelo Monfort
1013caba75 bluez: add configure switch for BlueZ 5 2013-09-25 21:01:04 +02:00
Jiří Klimeš
8a04ab9135 examples: group python examples - dbus vs. gi
Move examples using dbus-python ('dbus' module) and GObject introspection into
their own directories.
2013-09-24 12:52:33 +02:00
Jiri Pirko
2ba2390a82 add libteamdctl for configure.ac
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2013-08-22 09:38:11 -04:00
Jiří Klimeš
4aa56de14c build: only add 'serial-tests' for automake >= 1.12
Earlier versions of automake complain if they get a configuration
parameter which they don't understand.  The error is:

configure.ac:19: option `serial-tests' not recognized

Use some m4 hackery to work around this.

Stolen from here by jklimes:
https://www.redhat.com/archives/libguestfs/2013-February/msg00102.html
2013-07-30 12:53:42 +02:00
Pavel Šimerda
da71cc6e8c trivial: allow building tests from rdisc directory
The nm-rdisc subsystem, just as the nm-platform subsystem is separately
testable and it proved convenient to be able to build the test programs
by just typing 'make' in the rdisc/platform directory where the source
code for those modules resides.
2013-07-30 11:40:18 +02:00
Pavel Šimerda
b38f76cdb4 build: use a helper script for all valgrind tests 2013-07-26 19:08:03 +02:00
Pavel Šimerda
7b2a4054b0 build: always use serial-tests 2013-07-26 18:16:18 +02:00
Dan Williams
0744c6be08 build: simplify rdisc tests makefile subdirs
src/rdisc doesn't need a makefile just to point to the tests,
we can do that more easily from src/Makefile.am like we do for
all the other tests subdirs.
2013-07-24 14:05:46 -05:00
Pavel Šimerda
bd1c7fbece device: use internal router discovery implementation 2013-07-20 17:08:01 +02:00
Pavel Šimerda
21a8a71d48 rdisc: abstract class and fake implementation
Abstract class, fake implementation and a manual testing tool for
NetworkManager's internal IPv6 router discovery module. When a real
implementation is ready, it will replace nm-ip6-manager and will be used
by nm-device.
2013-07-20 16:50:18 +02:00
Dan Williams
89512ec5c4 build: allow dhcpcd versions higher than 5
No reason to exclude them, just that configure.ac hasn't tracked new
versions of dhcpcd.
2013-07-19 13:41:28 -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
Dan Winship
c347ac2123 build: allow building against system libndp 2013-06-13 10:24:01 -03:00
Pavel Šimerda
bbce69491a rdisc: build libndp recursively 2013-06-06 06:47:17 +02:00
Aleksander Morgado
c3706810ef modem-manager: read 'SupportedCapabilities' instead of 'ModemCapabilities' (bgo #701668)
There is no longer a 'ModemCapabilities' uint32 property; instead we have
'SupportedCapabilities' giving a list of uint32 values. Just read the list and
merge the values into a single mask; NM doesn't care about the exact
combinations supported.

https://bugzilla.gnome.org/show_bug.cgi?id=701668
2013-06-05 12:59:32 -05:00
Dan Williams
db3ad9bc90 systemd: update for network-online.target for systemd >= 200 (rh #787314)
systemd's new network-online target abstracts the "wait until
networking is up" stuff, and NM-wait-online implements that
functionality.  Thus NM-wait-online should be ordered before
(and thus be a dependency of) network-online.
2013-06-03 11:30:35 -05:00
Dan Williams
b9ea3ed1b1 build: don't install nm-dhcp-helper dbus permissions if we don't need to
The DHCP helper uses a private socket when building with dbus-glib >= 0.100,
which means we don't need to install a D-Bus permissions file.
2013-05-14 15:37:41 -05:00
Dan Williams
408cafc889 build: fix detection of Qt on non-Fedora platforms (bgo #691583)
Apparently Qt.pc is a Fedora-specific file to allow parallel install
of Qt3 and Qt4.  We should instead be using the upstream QtCore.

https://bugzilla.gnome.org/show_bug.cgi?id=691583
2013-05-14 14:50:32 -05:00
Dan Williams
bbf0720a8d trivial: remove a bit of debug code 2013-05-14 11:13:00 -05:00
Dan Williams
3a5bf0517c build: always generate docs at dist time (bgo #700093)
dist tarballs shouldn't ever be released without the documentation,
and this allows us to build the tarballs with pre-generated docs
that get installed on the end system, but don't need to be built
there.  So the end system doesn't need gtk-doc installed, only
the dist system does.

https://bugzilla.gnome.org/show_bug.cgi?id=700093
2013-05-14 10:53:46 -05:00
Adrian Bunk
f5c29c9694 configure.ac cleanups
- unconditionally use AM_SILENT_RULES, automake 1.11 is already required
- remove the following macros whose results were unused:
  - AC_PROG_INSTALL
  - AC_HEADER_STDC
  - AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h syslog.h unistd.h)
  - AC_TYPE_MODE_T
  - AC_HEADER_TIME
  - AC_CHECK_FUNCS(select socket uname)
- remove the following obsolete macros (not relevant on non-historic systems):
  - AC_PROG_GCC_TRADITIONAL
  - AC_FUNC_MEMCMP

https://bugzilla.gnome.org/show_bug.cgi?id=700169
2013-05-13 10:29:37 -04:00
Dan Winship
3ab82ea20e core: move devices into a subdirectory
We have lots of device types and will soon have lots more, so let's
put them in their own directory.
2013-05-08 15:07:22 -04:00
Dan Winship
c4417c71b6 core: use non-recursive build
Although having different parts of NM in different subdirectories
keeps the source tree neat, it has made the build messy, particularly
because of cross-dependencies between the subdirs.

Reorganize to build all of the pieces of the NetworkManager binary
from src/Makefile, and only use recursive make for test programs,
helper binaries, and plugins.

As part of this, get rid of all the per-directory convenience
libraries, and switch to building a single top-level
libNetworkManager.la, containing everything except main.c, which all
of the test programs can then link against.
2013-05-08 15:07:18 -04:00
Aleksander Morgado
371f022116 build: fix reporting of modemmanager-1 compilation status
When --with-modem-manager-1=yes not explicitly specified (i.e. 'auto' mode), and
libmm-glib is not found, we should not report:
    Features:
      ...
      modemmanager-1: auto

Instead, better report:
    Features:
      ...
      modemmanager-1: no
2013-05-08 07:03:37 -05:00
Dan Williams
e0409e631b build: error at configure-time if WiMAX stack built with incompatible libnl (bgo #687630)
If the Intel WiMAX stack is built with libnl1, but NM is built with a
newer libnl, then symbol conflicts between libnl versions will occur
when the WiMAX plugin is loaded into NM, and NM will crash.

Distros should be building their WiMAX stack with libnl3, using the
following git repos, rather than the long-defunct Intel git repos:

git://people.freedesktop.org/~dcbw/wimax
git://people.freedesktop.org/~dcbw/wimax-tools

These repos contain fixes to allow the WiMAX stack to build against
libnl3.
2013-05-06 15:34:23 -05:00
Dan Williams
a112ec8f9e Revert "build: error at configure-time if WiMAX stack built with incompatible libnl (bgo #687630)"
This reverts commit fcf4542ab3.

Pushed before some requested cleanups were added.
2013-05-06 15:34:08 -05:00
Dan Williams
fcf4542ab3 build: error at configure-time if WiMAX stack built with incompatible libnl (bgo #687630)
If the Intel WiMAX stack is built with libnl1, but NM is built with a
newer libnl, then symbol conflicts between libnl versions will occur
when the WiMAX plugin is loaded into NM, and NM will crash.

Distros should be building their WiMAX stack with libnl3, using the
following git repos, rather than the long-defunct Intel git repos:

git://people.freedesktop.org/~dcbw/wimax
git://people.freedesktop.org/~dcbw/wimax-tools

These repos contain fixes to allow the WiMAX stack to build against
libnl3.
2013-05-06 12:21:30 -05:00