mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
connman: update to connman-1.30
This commit is contained in:
parent
57e5f0e7df
commit
bbdcbd93cb
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
PKG_NAME="connman"
|
PKG_NAME="connman"
|
||||||
# DO NOT UPGRADE!!
|
# DO NOT UPGRADE!!
|
||||||
PKG_VERSION="1.23"
|
PKG_VERSION="1.30"
|
||||||
PKG_REV="1"
|
PKG_REV="1"
|
||||||
PKG_ARCH="any"
|
PKG_ARCH="any"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
From 8068601eeddef150e0323bc9094a6c54a36ac45b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Justin Maggard <jmaggard10@gmail.com>
|
|
||||||
Date: Mon, 14 Jul 2014 10:27:47 -0700
|
|
||||||
Subject: [PATCH] gdhcp: Save the DHCP server IP when REBOOTING
|
|
||||||
|
|
||||||
We need to save the server IP when REBOOTING as well as SELECTING.
|
|
||||||
Without this, DHCP renew will never work, because we don't know where
|
|
||||||
to send the unicast renew packets.
|
|
||||||
---
|
|
||||||
gdhcp/client.c | 6 ++++++
|
|
||||||
1 file changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/gdhcp/client.c b/gdhcp/client.c
|
|
||||||
index 2b7202a..47ce2e8 100644
|
|
||||||
--- a/gdhcp/client.c
|
|
||||||
+++ b/gdhcp/client.c
|
|
||||||
@@ -2366,6 +2366,12 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
|
|
||||||
g_free(dhcp_client->assigned_ip);
|
|
||||||
dhcp_client->assigned_ip = get_ip(packet.yiaddr);
|
|
||||||
|
|
||||||
+ if (dhcp_client->state == REBOOTING) {
|
|
||||||
+ option = dhcp_get_option(&packet,
|
|
||||||
+ DHCP_SERVER_ID);
|
|
||||||
+ dhcp_client->server_ip = get_be32(option);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* Address should be set up here */
|
|
||||||
if (dhcp_client->lease_available_cb)
|
|
||||||
dhcp_client->lease_available_cb(dhcp_client,
|
|
||||||
--
|
|
||||||
2.1.0
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
From 7279ad0d48c367acfbeae325bf4290057fa0a09c Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Pasi=20Sj=C3=B6holm?= <pasi.sjoholm@jollamobile.com>
|
|
||||||
Date: Wed, 16 Jul 2014 22:30:34 +0300
|
|
||||||
Subject: [PATCH] gdhcp: adjust discovery/request timeout and retry values
|
|
||||||
|
|
||||||
Some dhcp servers are acting lazy (eg. Buffalo WBMR-G125)
|
|
||||||
therefore 3 second timeout value for discovery or request
|
|
||||||
is not enough. Adjusting the timeout value from 3 seconds
|
|
||||||
to 5 will fix the problem together with adjusting the
|
|
||||||
retry value not to increase the total time for waiting
|
|
||||||
for getting the lease.
|
|
||||||
---
|
|
||||||
gdhcp/client.c | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/gdhcp/client.c b/gdhcp/client.c
|
|
||||||
index 47ce2e8..7b47ad2 100644
|
|
||||||
--- a/gdhcp/client.c
|
|
||||||
+++ b/gdhcp/client.c
|
|
||||||
@@ -47,11 +47,11 @@
|
|
||||||
#include "common.h"
|
|
||||||
#include "ipv4ll.h"
|
|
||||||
|
|
||||||
-#define DISCOVER_TIMEOUT 3
|
|
||||||
-#define DISCOVER_RETRIES 10
|
|
||||||
+#define DISCOVER_TIMEOUT 5
|
|
||||||
+#define DISCOVER_RETRIES 6
|
|
||||||
|
|
||||||
-#define REQUEST_TIMEOUT 3
|
|
||||||
-#define REQUEST_RETRIES 5
|
|
||||||
+#define REQUEST_TIMEOUT 5
|
|
||||||
+#define REQUEST_RETRIES 3
|
|
||||||
|
|
||||||
typedef enum _listen_mode {
|
|
||||||
L_NONE,
|
|
||||||
--
|
|
||||||
2.1.0
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
From e4d54a59f6db20a79181e1666a28d292b07a4652 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Justin Maggard <jmaggard10@gmail.com>
|
|
||||||
Date: Wed, 16 Jul 2014 11:12:12 -0700
|
|
||||||
Subject: [PATCH] gdhcp: Request an actual IP address when rebinding
|
|
||||||
|
|
||||||
We need to specify a requested IP address when our DHCP client state
|
|
||||||
is REBINDING as well as REQUESTING and REBOOTING; or else we end up
|
|
||||||
sending a DHCP request for 0.0.0.0, which generally just gets ignored.
|
|
||||||
---
|
|
||||||
gdhcp/client.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/gdhcp/client.c b/gdhcp/client.c
|
|
||||||
index 7b47ad2..45922f1 100644
|
|
||||||
--- a/gdhcp/client.c
|
|
||||||
+++ b/gdhcp/client.c
|
|
||||||
@@ -484,13 +484,13 @@ static int send_request(GDHCPClient *dhcp_client)
|
|
||||||
|
|
||||||
add_send_options(dhcp_client, &packet);
|
|
||||||
|
|
||||||
- if (dhcp_client->state == RENEWING) {
|
|
||||||
+ if (dhcp_client->state == RENEWING || dhcp_client->state == REBINDING)
|
|
||||||
packet.ciaddr = htonl(dhcp_client->requested_ip);
|
|
||||||
|
|
||||||
+ if (dhcp_client->state == RENEWING)
|
|
||||||
return dhcp_send_kernel_packet(&packet,
|
|
||||||
dhcp_client->requested_ip, CLIENT_PORT,
|
|
||||||
dhcp_client->server_ip, SERVER_PORT);
|
|
||||||
- }
|
|
||||||
|
|
||||||
return dhcp_send_raw_packet(&packet, INADDR_ANY, CLIENT_PORT,
|
|
||||||
INADDR_BROADCAST, SERVER_PORT,
|
|
||||||
--
|
|
||||||
2.1.0
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
|||||||
From 88c490b3a743dcfdc0dc071b7a7055f1468719f5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alexandru Costache <alexandrux.costache@intel.com>
|
|
||||||
Date: Wed, 2 Jul 2014 09:23:38 -0400
|
|
||||||
Subject: [PATCH] dhcp: Fix further crashes when connected to network without
|
|
||||||
dhcp
|
|
||||||
|
|
||||||
There are several crashing conditions in dhcp_retry_cb() and in
|
|
||||||
ipv4ll_available_cb(), when service is NULL or dhcp->network is
|
|
||||||
either NULL or has been freed. Fixed all by removing timeout and
|
|
||||||
ipv4ll callback when invalidating dhcp.
|
|
||||||
---
|
|
||||||
src/dhcp.c | 40 +++++++++++++++++++++++++---------------
|
|
||||||
1 file changed, 25 insertions(+), 15 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/dhcp.c b/src/dhcp.c
|
|
||||||
index e4bac67..70a7d96 100644
|
|
||||||
--- a/src/dhcp.c
|
|
||||||
+++ b/src/dhcp.c
|
|
||||||
@@ -70,6 +70,20 @@ static void dhcp_free(struct connman_dhcp *dhcp)
|
|
||||||
g_free(dhcp);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void ipv4ll_stop_client(struct connman_dhcp *dhcp)
|
|
||||||
+{
|
|
||||||
+ if (!dhcp->ipv4ll_client)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ g_dhcp_client_stop(dhcp->ipv4ll_client);
|
|
||||||
+ g_dhcp_client_unref(dhcp->ipv4ll_client);
|
|
||||||
+ dhcp->ipv4ll_client = NULL;
|
|
||||||
+ ipv4ll_running = false;
|
|
||||||
+
|
|
||||||
+ g_free(dhcp->ipv4ll_debug_prefix);
|
|
||||||
+ dhcp->ipv4ll_debug_prefix = NULL;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/**
|
|
||||||
* dhcp_invalidate: Invalidate an existing DHCP lease
|
|
||||||
* @dhcp: pointer to the DHCP lease to invalidate.
|
|
||||||
@@ -132,6 +146,14 @@ static void dhcp_invalidate(struct connman_dhcp *dhcp, bool callback)
|
|
||||||
__connman_ipconfig_set_gateway(ipconfig, NULL);
|
|
||||||
__connman_ipconfig_set_prefixlen(ipconfig, 0);
|
|
||||||
|
|
||||||
+ if (dhcp->timeout > 0) {
|
|
||||||
+ g_source_remove(dhcp->timeout);
|
|
||||||
+ dhcp->timeout = 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (ipv4ll_running)
|
|
||||||
+ ipv4ll_stop_client(dhcp);
|
|
||||||
+
|
|
||||||
if (dhcp->callback && callback) {
|
|
||||||
g_hash_table_remove(network_table, dhcp->network);
|
|
||||||
network_removed = true;
|
|
||||||
@@ -157,20 +179,6 @@ static void dhcp_debug(const char *str, void *data)
|
|
||||||
connman_info("%s: %s", (const char *) data, str);
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void ipv4ll_stop_client(struct connman_dhcp *dhcp)
|
|
||||||
-{
|
|
||||||
- if (!dhcp->ipv4ll_client)
|
|
||||||
- return;
|
|
||||||
-
|
|
||||||
- g_dhcp_client_stop(dhcp->ipv4ll_client);
|
|
||||||
- g_dhcp_client_unref(dhcp->ipv4ll_client);
|
|
||||||
- dhcp->ipv4ll_client = NULL;
|
|
||||||
- ipv4ll_running = false;
|
|
||||||
-
|
|
||||||
- g_free(dhcp->ipv4ll_debug_prefix);
|
|
||||||
- dhcp->ipv4ll_debug_prefix = NULL;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
static void ipv4ll_lost_cb(GDHCPClient *dhcp_client, gpointer user_data);
|
|
||||||
static void ipv4ll_available_cb(GDHCPClient *ipv4ll_client, gpointer user_data);
|
|
||||||
|
|
||||||
@@ -574,8 +582,10 @@ static int dhcp_release(struct connman_dhcp *dhcp)
|
|
||||||
{
|
|
||||||
DBG("dhcp %p", dhcp);
|
|
||||||
|
|
||||||
- if (dhcp->timeout > 0)
|
|
||||||
+ if (dhcp->timeout > 0) {
|
|
||||||
g_source_remove(dhcp->timeout);
|
|
||||||
+ dhcp->timeout = 0;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (dhcp->dhcp_client) {
|
|
||||||
g_dhcp_client_stop(dhcp->dhcp_client);
|
|
||||||
--
|
|
||||||
1.7.10.4
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user