[PATCH] fixed noisy error Cannot read /proc/net/pnp Failed to open file
by Vasyl Vavrychuk
This error happend on every boot.
---
src/inet.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/inet.c b/src/inet.c
index dcd1ab24..80d96737 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -3233,6 +3233,9 @@ char **__connman_inet_get_pnp_nameservers(const char *pnp_file)
if (!pnp_file)
pnp_file = "/proc/net/pnp";
+ if (!g_file_test(pnp_file, G_FILE_TEST_EXISTS))
+ goto out;
+
if (!g_file_get_contents(pnp_file, &pnp, NULL, &error)) {
connman_error("%s: Cannot read %s %s\n", __func__,
pnp_file, error->message);
--
2.11.0
3 years, 10 months
[PATCH 1/2] rtnl: Bail out if interface name is blacklisted
by Peter Meerwald-Stadler
blacklisting an interface doesn't work for me after
commit d81f21e3 (rtnl: retry to add ether interface after renaming)
Signed-off-by: Peter Meerwald-Stadler <pmeerw(a)pmeerw.net>
---
src/rtnl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/rtnl.c b/src/rtnl.c
index 8080ff01..cba5ef7a 100644
--- a/src/rtnl.c
+++ b/src/rtnl.c
@@ -127,6 +127,7 @@ static void read_uevent(struct interface_data *interface)
if (ether_blacklisted(name)) {
interface->service_type = CONNMAN_SERVICE_TYPE_UNKNOWN;
interface->device_type = CONNMAN_DEVICE_TYPE_UNKNOWN;
+ goto out;
} else {
interface->service_type = CONNMAN_SERVICE_TYPE_ETHERNET;
interface->device_type = CONNMAN_DEVICE_TYPE_ETHERNET;
--
2.17.0
4 years
[PATCH 1/3] README: mention address conflict detection, RFC 5227
by Peter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler <pmeerw(a)pmeerw.net>
---
README | 1 +
1 file changed, 1 insertion(+)
diff --git a/README b/README
index f9610e13..f16b9ec0 100644
--- a/README
+++ b/README
@@ -11,6 +11,7 @@ The following features are built-in into Connection Manager:
- Generic plugin infrastructure
- Device and network abstraction (with basic storage support)
- IPv4, IPv4-LL (link-local) and DHCP
+ - IPv4 address conflict detection (ACD) according to RFC 5227
- IPv6, DHCPv6 and 6to4 tunnels
- Advanced routing and DNS configuration
- Built-in DNS proxy and intelligent caching
--
2.17.0
4 years
[PATCH v2 0/3] Add UseGatewaysAsTimeservers option
by Chris Novakovic
This series implements a UseGatewaysAsTimeservers option for main.conf,
which can be used to control ConnMan's behaviour of adding service
gateways to the list of timeservers.
Chris Novakovic (3):
main: add UseGatewaysAsTimeservers option
timeserver: use gateways as timeservers if UseGatewaysAsTimeservers=true
main.conf: document UseGatewaysAsTimeservers option
doc/connman.conf.5.in | 11 ++++++++---
src/main.c | 14 ++++++++++++++
src/main.conf | 10 +++++++---
src/timeserver.c | 21 ++++++++++++---------
4 files changed, 41 insertions(+), 15 deletions(-)
--
2.14.1
4 years, 1 month
[PATCH v3 00/27] implement Address Conflict Detection
by Christian Spielberger
This patch series implements Address Conflict Detection (ACD) according to
RFC-5227. The review comments of the RFC PATCH v2 series (thanks Daniel!) have
been taken into account:
- Building with my-bootstrap-configure (from Daniel) and make distcheck each
patch. Now they build all without warnings.
- Use functions for random number generation in src/util.c.
- Renaming and further cleanup with respect to doc/coding-style.txt.
- Compared carefully each patch with patch series v2 and tested again static and
dhcp case.
Patches 1 to 6 are unrelated and move common code to src/shared and adds
utility functions.
Patch 7 to 17 adds new files for ACD functionality. The IPv4LL code in gdhcp was
used as a basis for implementing ACD.
High-level conflict handling is placed in network, Patches 18 to 20.
Patch 21 adds a DBus property to inform about ACD.
Patch 22 to 25 adds sending of DHCP decline message in case an address conflict
is detected.
Patch 26 is for sending dbus signal also after the address defend failed and
own ip address is lost.
Patch 27 adds a DHCP decline also if second DHCP lease also has a conflict.
Christian Spielberger (26):
util: Add function __connman_util_random_delay_ms
dhcp: Use __connman_util_get_random
shared: Add low-level ARP functions
inet: Add __connman_inet_get_interface_mac_address()
shared/arp: Add arp_random_ip()
inet: Add function connman_inet_is_ifup()
Add Address Conflict Detection support (RFC 5227)
acd: Add struct acd_host
acd: Add functions start/stop_listening
acd: Add send_probe_packet
acd: Add send_announce_packet
acd: Add callback function pointers
acd: Add content of acd_host_start and acd_host_stop
acd: Add acd_defend_timeout and acd_announce_timeout
acd: Add handling of received arp packets
acd: Add callback registration
network: Init and start of acd
network: Add content of acd callback functions
network: Add ipv4ll as fallback for acd
acd: Add D-Bus property for address conflict
dhcp: Add sending of DHCP decline
network: Add function for delayed dhcp start
acd: Add acd_host_get_conflicts_count
network: Send DHCP decline in case of address conflict
acd: Report address lost case per D-Bus also
network: Also send DHCP DECLINE after second DHCP try
Peter Meerwald-Stadler (1):
doc: Add documentation for AddressConflictDetection
Makefile.am | 28 ++-
doc/connman.conf.5.in | 10 +
doc/service-api.txt | 32 +++
gdhcp/client.c | 96 ++++----
gdhcp/common.c | 39 +---
gdhcp/gdhcp.h | 4 +-
gdhcp/ipv4ll.c | 87 +------
gdhcp/ipv4ll.h | 55 -----
include/acd.h | 64 ++++++
include/inet.h | 1 +
include/network.h | 7 +
include/service.h | 1 +
src/acd.c | 588 +++++++++++++++++++++++++++++++++++++++++++++++
src/connman.h | 3 +
src/dhcp.c | 26 ++-
src/inet.c | 69 ++++++
src/main.c | 13 ++
src/network.c | 335 +++++++++++++++++++++++++++
src/service.c | 11 +
src/shared/arp.c | 126 ++++++++++
src/shared/arp.h | 47 ++++
src/util.c | 12 +
tools/dhcp-server-test.c | 5 +-
tools/dhcp-test.c | 5 +-
24 files changed, 1420 insertions(+), 244 deletions(-)
delete mode 100644 gdhcp/ipv4ll.h
create mode 100644 include/acd.h
create mode 100644 src/acd.c
create mode 100644 src/shared/arp.c
create mode 100644 src/shared/arp.h
--
2.7.4
4 years, 1 month
[PATCH] session: call g_dbus_unregister_interface in free_session
by Harish Jenny K N
There is a scenario where g_dbus_register_interface will fail
in session_policy_config_cb due to failure to call
g_dbus_unregister_interface in cleanup_session.
Hence add a call to unregister dbus interface in cleanup_session.
---
src/session.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/session.c b/src/session.c
index 5a14cef..59a01c0 100644
--- a/src/session.c
+++ b/src/session.c
@@ -515,6 +515,9 @@ static void free_session(struct connman_session *session)
if (session->notify_watch > 0)
g_dbus_remove_watch(connection, session->notify_watch);
+ g_dbus_unregister_interface(connection, session->session_path,
+ CONNMAN_SESSION_INTERFACE);
+
destroy_policy_config(session);
g_slist_free(session->info->config.allowed_bearers);
g_free(session->info->config.allowed_interface);
--
1.9.1
4 years, 1 month
[PATCH] session: Do not call cleanup_session twice in session_policy_config_cb
by Harish Jenny K N
cleanup_session was getting called twice ( once from removal of
entry from global hash table ( i.e session_hash and another direct
call from error case in session_policy_config_cb.) which was
resulting in memory corruption due to use after free.
This patch removes calling cleanup_session twice in session_policy_config_cb.
---
src/session.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/session.c b/src/session.c
index 834b3a6..5a14cef 100644
--- a/src/session.c
+++ b/src/session.c
@@ -1407,8 +1407,9 @@ static int session_policy_config_cb(struct connman_session *session,
session_methods, NULL, NULL,
session, NULL)) {
connman_error("Failed to register %s", session->session_path);
+ g_hash_table_remove(session_hash, session->session_path);
err = -EINVAL;
- goto err;
+ goto err_notify;
}
reply = g_dbus_create_reply(creation_data->pending,
@@ -1433,12 +1434,13 @@ static int session_policy_config_cb(struct connman_session *session,
return 0;
err:
- g_hash_table_remove(session_hash, session->session_path);
+ cleanup_session(session);
+
+err_notify:
reply = __connman_error_failed(creation_data->pending, -err);
g_dbus_send_message(connection, reply);
creation_data->pending = NULL;
- cleanup_session(session);
cleanup_creation_data(creation_data);
return err;
--
1.9.1
4 years, 1 month
[PATCH 0/1] Don't use gateway as timeserver
by Chris Novakovic
On my local network, I've noticed a client using ConnMan sending NTP
packets to an IP address specified in DHCP option 3, even when that IP
address doesn't appear in DHCP option 42. Upon closer inspection, this
is because src/timeserver.c adds the gateway for a particular service to
its list of NTP servers. This behaviour is incorrect: the only
assumption that can be made about a gateway is that it functions as a
router. If an NTP server is also present on the gateway, it is the job
of the DHCP server to inform clients of this via DHCP option 42, which
ConnMan already (correctly) uses when building its list of NTP servers.
This patch stops ConnMan from automatically adding the IP addresses of
gateways to its list of NTP servers.
Chris Novakovic (1):
timeserver: don't use gateway as timeserver
src/timeserver.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
--
2.14.1
4 years, 1 month
ConnMan 1.36
by Daniel Wagner
ConnMan 1.36 was released on 12.05.2018.
The highlight (aka new features) are:
- Add support for systemd-resolved backend.
- Add support for mDNS configuration setup.
Both features were added by Ismo Puustinen from Intel
Improvements and bug fixes include:
- Fix issue with DNS short response on error handling.
- Fix issue with handling incoming DNS requests.
- Fix issue with handling empty timeserver list.
- Fix issue with incorrect DHCP byte order.
- Fix issue with AllowDomainnameUpdates handling.
- Fix issue with IPv4 link-local IP conflict error.
- Fix issue with handling WISPr over TLS connections.
- Fix issue with WiFi background scanning handling.
- Fix issue with WiFi disconnect+connect race condition.
- Fix issue with WiFi scanning and tethering operation.
- Fix issue with WiFi security change handling.
- Fix issue with missing signal for WPS changes.
- Fix issue with online check retry handling.
Thanks for all the hard work and bug fixes go to Alexander Kochetkov,
André Draszik, Angus Gratton, Bertrand Jacquin, Bjoern Thorwirth, Chris
Novakovic, Christophe Ronco, Daniel Mack, Daniel Wagner, Eliott Dumeix,
Gerald Loacker, Harish Jenny K N, Ismo Puustinen, Jian Liang, Jonas
Bonn, Jose Blanquicet, Jussi Laakkonen, Marcel Holtmann, Mikhail
Kovyazin, Mounesh Sutar, Niraj Kumar Goit, Patrik Flykt, Peter
Meerwald-Stadler, Robert Tiemann, Santtu Lakkala, Saurav Babu, Slava
Monich and Vasyl Vavrychuk.
ConnMan 1.36 can be downloaded from:
http://www.kernel.org/pub/linux/network/connman/
ConnMan is available via git at:
git://git.kernel.org/pub/scm/network/connman/connman.git
Web interface to the git repository:
http://git.kernel.org/?p=network/connman/connman.git;a=summary
4 years, 1 month