Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: [PATCH] Supporting wifi load balancing and band steering
(Patrik Flykt)
2. Re: [PATCH] plugins/wifi: Do not disable network on
Disconnect (Patrik Flykt)
3. [PATCH] dhcp: Set link MTU if available (Patrik Flykt)
----------------------------------------------------------------------
Message: 1
Date: Wed, 30 Mar 2016 09:20:04 +0300
From: Patrik Flykt <[email protected]>
To: Naveen Singh <[email protected]>
Cc: [email protected], Naveen Singh <[email protected]>
Subject: Re: [PATCH] Supporting wifi load balancing and band steering
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"
On Tue, 2016-03-22 at 17:18 -0700, Naveen Singh wrote:
> Gsupplicant state handling code will have to look into state and act
> differently. Like if current state is ASSOCIATING and going to be
> state is DISCONNECTED, it needs to look what was previous assoc
> status code? Also once the state becomes CONNECTED, it needs to clear
> the reason and assoc status code and also reset the counter variable
> (which was tracking retry). This is going to make that code
> cluttered.
>
> This is place in code where we would handle above mentioned
>
> ? ? ? ? ?} else if (g_strcmp0(key, "State") == 0) {
> 2062 ? ? ? ? ? ? ? ? const char *str = NULL;
> 2063?
> 2064 ? ? ? ? ? ? ? ? dbus_message_iter_get_basic(iter, &str);
> 2065 ? ? ? ? ? ? ? ? if (str)
> 2066 ? ? ? ? ? ? ? ? ? ? ? ? if (string2state(str) != interface->state) {
> 2067 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? interface->state = string2state(str);
> 2068 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? callback_interface_state(interface);
> 2069 ? ? ? ? ? ? ? ? ? ? ? ? }
> 2070?
>
> If you think this is correct I can send you a patch with all these
> changes. Let me know
Mmmkay. Maybe it's easier to create a solution where plugins/wifi.c
handless disconnects. Let's do that and include all patches in the same
set so we can test.
But watch out, I think that the whole D-Bus signal from wpa_supplicant
needs to be parsed first before calling any callbacks.
Cheers,
Patrik
------------------------------
Message: 2
Date: Wed, 30 Mar 2016 09:21:50 +0300
From: Patrik Flykt <[email protected]>
To: Naveen Singh <[email protected]>
Cc: [email protected], Naveen Singh <[email protected]>
Subject: Re: [PATCH] plugins/wifi: Do not disable network on
Disconnect
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"
On Sun, 2016-03-27 at 23:03 -0700, Naveen Singh wrote:
> What is your thought on this? Without this change, band steering/load
> balancing would be very difficult to implement.
Let's have a patch set with all the needed changes and then test it as
much as possible.
Cheers,
Patrik
------------------------------
Message: 3
Date: Wed, 30 Mar 2016 14:07:34 +0300
From: Patrik Flykt <[email protected]>
To: [email protected]
Subject: [PATCH] dhcp: Set link MTU if available
Message-ID:
<[email protected]>
Request DHCP Interface MTU option from the DHCP server and set the
MTU if it is between the minimum required for IPv6 and the maximum
for ethernet networks.
Reported by auto.
---
Please test,
Patrik
gdhcp/common.c | 1 +
gdhcp/gdhcp.h | 1 +
src/dhcp.c | 20 ++++++++++++++++++++
3 files changed, 22 insertions(+)
diff --git a/gdhcp/common.c b/gdhcp/common.c
index f3d4677..3817bcc 100644
--- a/gdhcp/common.c
+++ b/gdhcp/common.c
@@ -46,6 +46,7 @@ static const DHCPOption client_options[] = {
{ OPTION_IP | OPTION_LIST, 0x06 }, /* domain-name-servers */
{ OPTION_STRING, 0x0c }, /* hostname */
{ OPTION_STRING, 0x0f }, /* domain-name */
+ { OPTION_U16, 0x1a }, /* mtu */
{ OPTION_IP | OPTION_LIST, 0x2a }, /* ntp-servers */
{ OPTION_U32, 0x33 }, /* dhcp-lease-time */
/* Options below will not be exposed to user */
diff --git a/gdhcp/gdhcp.h b/gdhcp/gdhcp.h
index 0ed7fa5..3dcb7a5 100644
--- a/gdhcp/gdhcp.h
+++ b/gdhcp/gdhcp.h
@@ -77,6 +77,7 @@ typedef enum {
#define G_DHCP_DNS_SERVER 0x06
#define G_DHCP_DOMAIN_NAME 0x0f
#define G_DHCP_HOST_NAME 0x0c
+#define G_DHCP_MTU 0x1a
#define G_DHCP_NTP_SERVER 0x2a
#define G_DHCP_CLIENT_ID 0x3d
diff --git a/src/dhcp.c b/src/dhcp.c
index 4040ad1..1d2cd48 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -26,6 +26,11 @@
#include <errno.h>
#include <string.h>
#include <stdlib.h>
+#include <net/ethernet.h>
+
+#ifndef IPV6_MIN_MTU
+#define IPV6_MIN_MTU 1280
+#endif
#include <connman/ipconfig.h>
#include <include/setting.h>
@@ -327,6 +332,20 @@ static bool apply_lease_available_on_network(GDHCPClient
*dhcp_client,
return false;
}
+ option = g_dhcp_client_get_option(dhcp_client, G_DHCP_MTU);
+ if (option && option->data) {
+ int mtu, index, err;
+
+ mtu = atoi(option->data);
+
+ if (mtu >= IPV6_MIN_MTU && mtu <= ETH_DATA_LEN) {
+ index = __connman_ipconfig_get_index(dhcp->ipconfig);
+ err = connman_inet_set_mtu(index, mtu);
+
+ DBG("MTU %d index %d err %d", mtu, index, err);
+ }
+ }
+
option = g_dhcp_client_get_option(dhcp_client, 252);
if (option)
pac = g_strdup(option->data);
@@ -544,6 +563,7 @@ static int dhcp_initialize(struct connman_dhcp *dhcp)
g_dhcp_client_set_request(dhcp_client, G_DHCP_DOMAIN_NAME);
g_dhcp_client_set_request(dhcp_client, G_DHCP_NTP_SERVER);
g_dhcp_client_set_request(dhcp_client, 252);
+ g_dhcp_client_set_request(dhcp_client, G_DHCP_MTU);
}
g_dhcp_client_set_request(dhcp_client, G_DHCP_SUBNET);
--
2.8.0.rc3
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 5, Issue 32
**************************************