diff --git a/packages/network/connman/patches/connman-07_gdhcp-Save-the-DHCP-server-IP-when-REBOOTING.patch b/packages/network/connman/patches/connman-07_gdhcp-Save-the-DHCP-server-IP-when-REBOOTING.patch new file mode 100644 index 0000000000..bd779293f7 --- /dev/null +++ b/packages/network/connman/patches/connman-07_gdhcp-Save-the-DHCP-server-IP-when-REBOOTING.patch @@ -0,0 +1,32 @@ +From 8068601eeddef150e0323bc9094a6c54a36ac45b Mon Sep 17 00:00:00 2001 +From: Justin Maggard +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 + diff --git a/packages/network/connman/patches/connman-08_gdhcp-adjust-discovery-request-timeout-and-retry-val.patch b/packages/network/connman/patches/connman-08_gdhcp-adjust-discovery-request-timeout-and-retry-val.patch new file mode 100644 index 0000000000..ad20f19df6 --- /dev/null +++ b/packages/network/connman/patches/connman-08_gdhcp-adjust-discovery-request-timeout-and-retry-val.patch @@ -0,0 +1,38 @@ +From 7279ad0d48c367acfbeae325bf4290057fa0a09c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pasi=20Sj=C3=B6holm?= +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 + diff --git a/packages/network/connman/patches/connman-09_gdhcp-Request-an-actual-IP-address-when-rebinding.patch b/packages/network/connman/patches/connman-09_gdhcp-Request-an-actual-IP-address-when-rebinding.patch new file mode 100644 index 0000000000..9ceb50c86e --- /dev/null +++ b/packages/network/connman/patches/connman-09_gdhcp-Request-an-actual-IP-address-when-rebinding.patch @@ -0,0 +1,35 @@ +From e4d54a59f6db20a79181e1666a28d292b07a4652 Mon Sep 17 00:00:00 2001 +From: Justin Maggard +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 +