diff options
Diffstat (limited to 'src/rdisc')
| -rw-r--r-- | src/rdisc/Makefile.in | 6 | ||||
| -rw-r--r-- | src/rdisc/nm-fake-rdisc.c | 2 | ||||
| -rw-r--r-- | src/rdisc/nm-fake-rdisc.h | 6 | ||||
| -rw-r--r-- | src/rdisc/nm-lndp-rdisc.c | 150 | ||||
| -rw-r--r-- | src/rdisc/nm-lndp-rdisc.h | 6 | ||||
| -rw-r--r-- | src/rdisc/nm-rdisc.c | 23 | ||||
| -rw-r--r-- | src/rdisc/nm-rdisc.h | 16 | ||||
| -rw-r--r-- | src/rdisc/tests/Makefile.am | 14 | ||||
| -rw-r--r-- | src/rdisc/tests/Makefile.in | 24 | ||||
| -rw-r--r-- | src/rdisc/tests/rdisc.c | 5 |
10 files changed, 149 insertions, 103 deletions
diff --git a/src/rdisc/Makefile.in b/src/rdisc/Makefile.in index bee23500..47a71931 100644 --- a/src/rdisc/Makefile.in +++ b/src/rdisc/Makefile.in @@ -189,6 +189,8 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@ +BLUEZ5_LIBS = @BLUEZ5_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -312,6 +314,7 @@ NEWT_CFLAGS = @NEWT_CFLAGS@ NEWT_LIBS = @NEWT_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT = @NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT@ NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ NM_MICRO_VERSION = @NM_MICRO_VERSION@ NM_MINOR_VERSION = @NM_MINOR_VERSION@ @@ -331,6 +334,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -357,7 +361,7 @@ SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@ SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@ SYSTEMD_LOGIN_LIBS = @SYSTEMD_LOGIN_LIBS@ SYSTEM_CA_PATH = @SYSTEM_CA_PATH@ -UDEV_BASE_DIR = @UDEV_BASE_DIR@ +UDEV_DIR = @UDEV_DIR@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ diff --git a/src/rdisc/nm-fake-rdisc.c b/src/rdisc/nm-fake-rdisc.c index bdd207ca..e631f28d 100644 --- a/src/rdisc/nm-fake-rdisc.c +++ b/src/rdisc/nm-fake-rdisc.c @@ -18,6 +18,8 @@ * Copyright (C) 2013 Red Hat, Inc. */ +#include "config.h" + #include <string.h> #include <arpa/inet.h> diff --git a/src/rdisc/nm-fake-rdisc.h b/src/rdisc/nm-fake-rdisc.h index 248283b2..b4eff7ec 100644 --- a/src/rdisc/nm-fake-rdisc.h +++ b/src/rdisc/nm-fake-rdisc.h @@ -18,8 +18,8 @@ * Copyright (C) 2013 Red Hat, Inc. */ -#ifndef NM_FAKE_RDISC_H -#define NM_FAKE_RDISC_H +#ifndef __NETWORKMANAGER_FAKE_RDISC_H__ +#define __NETWORKMANAGER_FAKE_RDISC_H__ #include "nm-rdisc.h" @@ -46,4 +46,4 @@ GType nm_fake_rdisc_get_type (void); NMRDisc *nm_fake_rdisc_new (int ifindex, const char *ifname); -#endif /* NM_FAKE_RDISC_H */ +#endif /* __NETWORKMANAGER_FAKE_RDISC_H__ */ diff --git a/src/rdisc/nm-lndp-rdisc.c b/src/rdisc/nm-lndp-rdisc.c index cf0267d1..ff1bd33d 100644 --- a/src/rdisc/nm-lndp-rdisc.c +++ b/src/rdisc/nm-lndp-rdisc.c @@ -18,6 +18,8 @@ * Copyright (C) 2013 Red Hat, Inc. */ +#include "config.h" + #include <string.h> #include <arpa/inet.h> /* stdarg.h included because of a bug in ndp.h */ @@ -28,6 +30,7 @@ #include "NetworkManagerUtils.h" #include "nm-logging.h" +#include "nm-platform.h" #define debug(...) nm_log_dbg (LOGD_IP6, __VA_ARGS__) #define warning(...) nm_log_warn (LOGD_IP6, __VA_ARGS__) @@ -39,7 +42,8 @@ typedef struct { guint send_rs_id; GIOChannel *event_channel; guint event_id; - guint timeout_id; + guint timeout_id; /* prefix/dns/etc lifetime timeout */ + guint ra_timeout_id; /* first RA timeout */ int solicitations_left; } NMLNDPRDiscPrivate; @@ -174,8 +178,15 @@ add_dns_server (NMRDisc *rdisc, const NMRDiscDNSServer *new) NMRDiscDNSServer *item = &g_array_index (rdisc->dns_servers, NMRDiscDNSServer, i); if (IN6_ARE_ADDR_EQUAL (&item->address, &new->address)) { - gboolean changed = item->timestamp != new->timestamp || - item->lifetime != new->lifetime; + gboolean changed; + + if (new->lifetime == 0) { + g_array_remove_index (rdisc->dns_servers, i); + return TRUE; + } + + changed = (item->timestamp != new->timestamp || + item->lifetime != new->lifetime); if (changed) { item->timestamp = new->timestamp; item->lifetime = new->lifetime; @@ -184,10 +195,6 @@ add_dns_server (NMRDisc *rdisc, const NMRDiscDNSServer *new) } } - /* DNS server should no longer be used */ - if (new->lifetime == 0) - return FALSE; - g_array_insert_val (rdisc->dns_servers, i, *new); return TRUE; } @@ -203,8 +210,15 @@ add_dns_domain (NMRDisc *rdisc, const NMRDiscDNSDomain *new) item = &g_array_index (rdisc->dns_domains, NMRDiscDNSDomain, i); if (!g_strcmp0 (item->domain, new->domain)) { - gboolean changed = item->timestamp != new->timestamp || - item->lifetime != new->lifetime; + gboolean changed; + + if (new->lifetime == 0) { + g_array_remove_index (rdisc->dns_domains, i); + return TRUE; + } + + changed = (item->timestamp != new->timestamp || + item->lifetime != new->lifetime); if (changed) { item->timestamp = new->timestamp; item->lifetime = new->lifetime; @@ -213,10 +227,6 @@ add_dns_domain (NMRDisc *rdisc, const NMRDiscDNSDomain *new) } } - /* Domain should no longer be used */ - if (new->lifetime == 0) - return FALSE; - g_array_insert_val (rdisc->dns_domains, i, *new); item = &g_array_index (rdisc->dns_domains, NMRDiscDNSDomain, i); item->domain = g_strdup (new->domain); @@ -433,42 +443,38 @@ translate_preference (enum ndp_route_preference preference) } static void -fill_address_from_mac (struct in6_addr *address, const char *mac) +clear_rs_timeout (NMLNDPRDisc *rdisc) { - unsigned char *identifier = address->s6_addr + 8; + NMLNDPRDiscPrivate *priv = NM_LNDP_RDISC_GET_PRIVATE (rdisc); - if (!mac) - return; + if (priv->send_rs_id) { + g_source_remove (priv->send_rs_id); + priv->send_rs_id = 0; + } +} - /* Translate 48-bit MAC address to a 64-bit modified interface identifier - * and write it to the second half of the IPv6 address. - * - * See http://tools.ietf.org/html/rfc3513#page-21 - */ - memcpy (identifier, mac, 3); - identifier[0] ^= 0x02; - identifier[3] = 0xff; - identifier[4] = 0xfe; - memcpy (identifier + 5, mac + 3, 3); +static void +clear_ra_timeout (NMLNDPRDisc *rdisc) +{ + NMLNDPRDiscPrivate *priv = NM_LNDP_RDISC_GET_PRIVATE (rdisc); + + if (priv->ra_timeout_id) { + g_source_remove (priv->ra_timeout_id); + priv->ra_timeout_id = 0; + } } static int receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data) { NMRDisc *rdisc = (NMRDisc *) user_data; - NMLNDPRDiscPrivate *priv = NM_LNDP_RDISC_GET_PRIVATE (rdisc); NMRDiscConfigMap changed = 0; - size_t lladdrlen = 0; - const char *lladdr = NULL; struct ndp_msgra *msgra = ndp_msgra (msg); NMRDiscGateway gateway; guint32 now = nm_utils_get_monotonic_timestamp_s (); int offset; int hop_limit; - if (rdisc->lladdr) - lladdr = g_bytes_get_data (rdisc->lladdr, &lladdrlen); - /* Router discovery is subject to the following RFC documents: * * http://tools.ietf.org/html/rfc4861 @@ -482,10 +488,8 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data) */ debug ("(%s): received router advertisement at %u", rdisc->ifname, now); - if (priv->send_rs_id) { - g_source_remove (priv->send_rs_id); - priv->send_rs_id = 0; - } + clear_ra_timeout (NM_LNDP_RDISC (rdisc)); + clear_rs_timeout (NM_LNDP_RDISC (rdisc)); /* DHCP level: * @@ -541,7 +545,7 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data) /* Address */ if (ndp_msg_opt_prefix_flag_auto_addr_conf (msg, offset)) { - if (route.plen == 64 && lladdrlen == 6) { + if (route.plen == 64 && rdisc->iid.id) { memset (&address, 0, sizeof (address)); address.address = route.network; address.timestamp = now; @@ -550,7 +554,8 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data) if (address.preferred > address.lifetime) address.preferred = address.lifetime; - fill_address_from_mac (&address.address, lladdr); + /* Add the Interface Identifier to the lower 64 bits */ + nm_utils_ipv6_addr_set_interface_identfier (&address.address, rdisc->iid); if (add_address (rdisc, &address)) changed |= NM_RDISC_CONFIG_ADDRESSES; @@ -624,26 +629,45 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data) changed |= NM_RDISC_CONFIG_HOP_LIMIT; } + /* MTU */ + ndp_msg_opt_for_each_offset(offset, msg, NDP_MSG_OPT_MTU) { + guint32 mtu = ndp_msg_opt_mtu(msg, offset); + if (mtu >= 1280) { + rdisc->mtu = mtu; + changed |= NM_RDISC_CONFIG_MTU; + } else { + /* All sorts of bad things would happen if we accepted this. + * Kernel would set it, but would flush out all IPv6 addresses away + * from the link, even the link-local, and we wouldn't be able to + * listen for further RAs that could fix the MTU. */ + warning ("(%s): MTU too small for IPv6 ignored: %d", rdisc->ifname, mtu); + } + } + check_timestamps (rdisc, now, changed); return 0; } -static void -process_events (NMRDisc *rdisc) +static gboolean +event_ready (GIOChannel *source, GIOCondition condition, NMRDisc *rdisc) { NMLNDPRDiscPrivate *priv = NM_LNDP_RDISC_GET_PRIVATE (rdisc); debug ("(%s): processing libndp events.", rdisc->ifname); ndp_callall_eventfd_handler (priv->ndp); + return G_SOURCE_CONTINUE; } static gboolean -event_ready (GIOChannel *source, GIOCondition condition, NMRDisc *rdisc) +rdisc_ra_timeout_cb (gpointer user_data) { - process_events (rdisc); + NMLNDPRDisc *rdisc = NM_LNDP_RDISC (user_data); + NMLNDPRDiscPrivate *priv = NM_LNDP_RDISC_GET_PRIVATE (rdisc); - return TRUE; + priv->ra_timeout_id = 0; + g_signal_emit_by_name (rdisc, NM_RDISC_RA_TIMEOUT); + return G_SOURCE_REMOVE; } static void @@ -651,14 +675,20 @@ start (NMRDisc *rdisc) { NMLNDPRDiscPrivate *priv = NM_LNDP_RDISC_GET_PRIVATE (rdisc); int fd = ndp_get_eventfd (priv->ndp); + guint ra_wait_secs; priv->event_channel = g_io_channel_unix_new (fd); priv->event_id = g_io_add_watch (priv->event_channel, G_IO_IN, (GIOFunc) event_ready, rdisc); + clear_ra_timeout (NM_LNDP_RDISC (rdisc)); + ra_wait_secs = CLAMP (rdisc->rtr_solicitations * rdisc->rtr_solicitation_interval, 30, 120); + priv->ra_timeout_id = g_timeout_add_seconds (ra_wait_secs, rdisc_ra_timeout_cb, rdisc); + debug ("(%s): scheduling RA timeout in %d seconds", rdisc->ifname, ra_wait_secs); + /* Flush any pending messages to avoid using obsolete information */ - process_events (rdisc); + event_ready (priv->event_channel, 0, rdisc); - ndp_msgrcv_handler_register (priv->ndp, &receive_ra, NDP_MSG_RA, rdisc->ifindex, rdisc); + ndp_msgrcv_handler_register (priv->ndp, receive_ra, NDP_MSG_RA, rdisc->ifindex, rdisc); solicit (rdisc); } @@ -670,21 +700,29 @@ nm_lndp_rdisc_init (NMLNDPRDisc *lndp_rdisc) } static void -nm_lndp_rdisc_finalize (GObject *object) +dispose (GObject *object) { - NMLNDPRDiscPrivate *priv = NM_LNDP_RDISC_GET_PRIVATE (object); + NMLNDPRDisc *rdisc = NM_LNDP_RDISC (object); + NMLNDPRDiscPrivate *priv = NM_LNDP_RDISC_GET_PRIVATE (rdisc); - if (priv->send_rs_id) - g_source_remove (priv->send_rs_id); - if (priv->timeout_id) + clear_rs_timeout (rdisc); + clear_ra_timeout (rdisc); + + if (priv->timeout_id) { g_source_remove (priv->timeout_id); - if (priv->event_channel) - g_io_channel_unref (priv->event_channel); - if (priv->event_id) + priv->timeout_id = 0; + } + + if (priv->event_id) { g_source_remove (priv->event_id); + priv->event_id = 0; + } + g_clear_pointer (&priv->event_channel, g_io_channel_unref); - if (priv->ndp) + if (priv->ndp) { ndp_close (priv->ndp); + priv->ndp = NULL; + } } static void @@ -695,6 +733,6 @@ nm_lndp_rdisc_class_init (NMLNDPRDiscClass *klass) g_type_class_add_private (klass, sizeof (NMLNDPRDiscPrivate)); - object_class->finalize = nm_lndp_rdisc_finalize; + object_class->dispose = dispose; rdisc_class->start = start; } diff --git a/src/rdisc/nm-lndp-rdisc.h b/src/rdisc/nm-lndp-rdisc.h index eb6a1df6..407e1f92 100644 --- a/src/rdisc/nm-lndp-rdisc.h +++ b/src/rdisc/nm-lndp-rdisc.h @@ -18,8 +18,8 @@ * Copyright (C) 2013 Red Hat, Inc. */ -#ifndef NM_LNDP_RDISC_H -#define NM_LNDP_RDISC_H +#ifndef __NETWORKMANAGER_LNDP_RDISC_H__ +#define __NETWORKMANAGER_LNDP_RDISC_H__ #include "nm-rdisc.h" @@ -46,4 +46,4 @@ GType nm_lndp_rdisc_get_type (void); NMRDisc *nm_lndp_rdisc_new (int ifindex, const char *ifname); -#endif /* NM_LNDP_RDISC_H */ +#endif /* __NETWORKMANAGER_LNDP_RDISC_H__ */ diff --git a/src/rdisc/nm-rdisc.c b/src/rdisc/nm-rdisc.c index 1682924c..8729fa63 100644 --- a/src/rdisc/nm-rdisc.c +++ b/src/rdisc/nm-rdisc.c @@ -18,6 +18,8 @@ * Copyright (C) 2013 Red Hat, Inc. */ +#include "config.h" + #include <stdlib.h> #include <arpa/inet.h> @@ -32,6 +34,7 @@ G_DEFINE_TYPE (NMRDisc, nm_rdisc, G_TYPE_OBJECT) enum { CONFIG_CHANGED, + RA_TIMEOUT, LAST_SIGNAL }; @@ -40,11 +43,11 @@ static guint signals[LAST_SIGNAL] = { 0 }; /******************************************************************/ void -nm_rdisc_set_lladdr (NMRDisc *rdisc, const char *addr, size_t addrlen) +nm_rdisc_set_iid (NMRDisc *rdisc, const NMUtilsIPv6IfaceId iid) { - if (rdisc->lladdr) - g_bytes_unref (rdisc->lladdr); - rdisc->lladdr = addr ? g_bytes_new (addr, addrlen) : NULL; + g_return_if_fail (NM_IS_RDISC (rdisc)); + + rdisc->iid = iid; } void @@ -152,7 +155,6 @@ nm_rdisc_init (NMRDisc *rdisc) rdisc->routes = g_array_new (FALSE, FALSE, sizeof (NMRDiscRoute)); rdisc->dns_servers = g_array_new (FALSE, FALSE, sizeof (NMRDiscDNSServer)); rdisc->dns_domains = g_array_new (FALSE, FALSE, sizeof (NMRDiscDNSDomain)); - rdisc->lladdr = NULL; rdisc->hop_limit = 64; } @@ -167,9 +169,6 @@ nm_rdisc_finalize (GObject *object) g_array_unref (rdisc->routes); g_array_unref (rdisc->dns_servers); g_array_unref (rdisc->dns_domains); - - if (rdisc->lladdr) - g_bytes_unref (rdisc->lladdr); } static void @@ -188,4 +187,12 @@ nm_rdisc_class_init (NMRDiscClass *klass) G_STRUCT_OFFSET (NMRDiscClass, config_changed), NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_INT); + + signals[RA_TIMEOUT] = g_signal_new ( + NM_RDISC_RA_TIMEOUT, + G_OBJECT_CLASS_TYPE (klass), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (NMRDiscClass, ra_timeout), + NULL, NULL, NULL, + G_TYPE_NONE, 0); } diff --git a/src/rdisc/nm-rdisc.h b/src/rdisc/nm-rdisc.h index fba06bc2..2d83f0f0 100644 --- a/src/rdisc/nm-rdisc.h +++ b/src/rdisc/nm-rdisc.h @@ -18,14 +18,16 @@ * Copyright (C) 2013 Red Hat, Inc. */ -#ifndef NM_RDISC_H -#define NM_RDISC_H +#ifndef __NETWORKMANAGER_RDISC_H__ +#define __NETWORKMANAGER_RDISC_H__ #include <glib-object.h> #include <stdlib.h> #include <netinet/in.h> +#include "NetworkManagerUtils.h" + #define NM_TYPE_RDISC (nm_rdisc_get_type ()) #define NM_RDISC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_RDISC, NMRDisc)) #define NM_RDISC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_RDISC, NMRDiscClass)) @@ -34,6 +36,7 @@ #define NM_RDISC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_RDISC, NMRDiscClass)) #define NM_RDISC_CONFIG_CHANGED "config-changed" +#define NM_RDISC_RA_TIMEOUT "ra-timeout" typedef enum { NM_RDISC_DHCP_LEVEL_UNKNOWN, @@ -92,6 +95,7 @@ typedef enum { NM_RDISC_CONFIG_DNS_SERVERS = 1 << 4, NM_RDISC_CONFIG_DNS_DOMAINS = 1 << 5, NM_RDISC_CONFIG_HOP_LIMIT = 1 << 6, + NM_RDISC_CONFIG_MTU = 1 << 7, } NMRDiscConfigMap; #define NM_RDISC_MAX_ADDRESSES_DEFAULT 16 @@ -110,7 +114,7 @@ typedef struct { int ifindex; char *ifname; - GBytes *lladdr; + NMUtilsIPv6IfaceId iid; gint32 max_addresses; gint32 rtr_solicitations; gint32 rtr_solicitation_interval; @@ -122,6 +126,7 @@ typedef struct { GArray *dns_servers; GArray *dns_domains; int hop_limit; + guint32 mtu; } NMRDisc; typedef struct { @@ -129,11 +134,12 @@ typedef struct { void (*start) (NMRDisc *rdisc); void (*config_changed) (NMRDisc *rdisc, NMRDiscConfigMap changed); + void (*ra_timeout) (NMRDisc *rdisc); } NMRDiscClass; GType nm_rdisc_get_type (void); -void nm_rdisc_set_lladdr (NMRDisc *rdisc, const char *addr, size_t addrlen); +void nm_rdisc_set_iid (NMRDisc *rdisc, const NMUtilsIPv6IfaceId iid); void nm_rdisc_start (NMRDisc *rdisc); -#endif /* NM_RDISC_H */ +#endif /* __NETWORKMANAGER_RDISC_H__ */ diff --git a/src/rdisc/tests/Makefile.am b/src/rdisc/tests/Makefile.am index cf351d61..e6fe1369 100644 --- a/src/rdisc/tests/Makefile.am +++ b/src/rdisc/tests/Makefile.am @@ -1,20 +1,15 @@ AM_CPPFLAGS = \ -I${top_srcdir} \ -I$(top_srcdir)/include \ - -I$(top_builddir)/include \ -I${top_srcdir}/src \ - -I${top_srcdir}/src/devices \ - -I${top_srcdir}/src/logging \ -I${top_srcdir}/src/platform \ - -I${top_srcdir}/src/posix-signals \ - -I${top_srcdir}/libnm-util \ + -I${top_srcdir}/libnm-core \ + -I${top_builddir}/libnm-core \ -I${srcdir}/.. \ -DG_LOG_DOMAIN=\""NetworkManager"\" \ + -DNETWORKMANAGER_COMPILATION \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) \ - $(POLKIT_CFLAGS) \ - $(LIBNL_CFLAGS) \ $(LIBNDP_CFLAGS) AM_CFLAGS = $(CODE_COVERAGE_CFLAGS) @@ -31,6 +26,5 @@ noinst_PROGRAMS = \ rdisc_SOURCES = \ rdisc.c rdisc_LDADD = \ - $(top_builddir)/src/libNetworkManager.la \ - $(LIBNDP_LIBS) + $(top_builddir)/src/libNetworkManager.la diff --git a/src/rdisc/tests/Makefile.in b/src/rdisc/tests/Makefile.in index 97ade88f..b2ea3c74 100644 --- a/src/rdisc/tests/Makefile.in +++ b/src/rdisc/tests/Makefile.in @@ -105,9 +105,7 @@ CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_rdisc_OBJECTS = rdisc.$(OBJEXT) rdisc_OBJECTS = $(am_rdisc_OBJECTS) -am__DEPENDENCIES_1 = -rdisc_DEPENDENCIES = $(top_builddir)/src/libNetworkManager.la \ - $(am__DEPENDENCIES_1) +rdisc_DEPENDENCIES = $(top_builddir)/src/libNetworkManager.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent @@ -182,6 +180,8 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@ +BLUEZ5_LIBS = @BLUEZ5_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -305,6 +305,7 @@ NEWT_CFLAGS = @NEWT_CFLAGS@ NEWT_LIBS = @NEWT_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT = @NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT@ NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ NM_MICRO_VERSION = @NM_MICRO_VERSION@ NM_MINOR_VERSION = @NM_MINOR_VERSION@ @@ -324,6 +325,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -350,7 +352,7 @@ SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@ SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@ SYSTEMD_LOGIN_LIBS = @SYSTEMD_LOGIN_LIBS@ SYSTEM_CA_PATH = @SYSTEM_CA_PATH@ -UDEV_BASE_DIR = @UDEV_BASE_DIR@ +UDEV_DIR = @UDEV_DIR@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ @@ -432,20 +434,15 @@ with_valgrind = @with_valgrind@ AM_CPPFLAGS = \ -I${top_srcdir} \ -I$(top_srcdir)/include \ - -I$(top_builddir)/include \ -I${top_srcdir}/src \ - -I${top_srcdir}/src/devices \ - -I${top_srcdir}/src/logging \ -I${top_srcdir}/src/platform \ - -I${top_srcdir}/src/posix-signals \ - -I${top_srcdir}/libnm-util \ + -I${top_srcdir}/libnm-core \ + -I${top_builddir}/libnm-core \ -I${srcdir}/.. \ -DG_LOG_DOMAIN=\""NetworkManager"\" \ + -DNETWORKMANAGER_COMPILATION \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) \ - $(POLKIT_CFLAGS) \ - $(LIBNL_CFLAGS) \ $(LIBNDP_CFLAGS) AM_CFLAGS = $(CODE_COVERAGE_CFLAGS) @@ -458,8 +455,7 @@ rdisc_SOURCES = \ rdisc.c rdisc_LDADD = \ - $(top_builddir)/src/libNetworkManager.la \ - $(LIBNDP_LIBS) + $(top_builddir)/src/libNetworkManager.la all: all-am diff --git a/src/rdisc/tests/rdisc.c b/src/rdisc/tests/rdisc.c index 1fdf5b67..d577a63a 100644 --- a/src/rdisc/tests/rdisc.c +++ b/src/rdisc/tests/rdisc.c @@ -18,6 +18,8 @@ * Copyright (C) 2013 Red Hat, Inc. */ +#include "config.h" + #include <string.h> #include <syslog.h> @@ -37,7 +39,6 @@ main (int argc, char **argv) NMRDisc *(*new) (int ifindex, const char *ifname); int ifindex = 1; const char *ifname; - char mac[6] = { 0x02, 0xaa, 0xbb, 0xcc, 0xdd, 0xee }; #if !GLIB_CHECK_VERSION (2, 35, 0) g_type_init (); @@ -69,8 +70,6 @@ main (int argc, char **argv) if (!rdisc) return EXIT_FAILURE; - nm_rdisc_set_lladdr (rdisc, mac, 6); - nm_rdisc_start (rdisc); g_main_loop_run (loop); |