From: Denis Kenzior <denkenz at gmail.com>
To: iwd at lists.01.org
Subject: Re: IWD is running as AP with the build-in DHCP but android phones report no internet connection and switch back to WiFi home network
Date: Fri, 05 Nov 2021 10:35:07 -0500 [thread overview]
Message-ID: <b29d30cd-7e96-3bed-4555-e79373f2dda9@gmail.com> (raw)
In-Reply-To: 20211105151439.2830.39111@ml01.vlan13.01.org
[-- Attachment #1: Type: text/plain, Size: 734 bytes --]
Hi Salahaldeen,
On 11/5/21 10:14 AM, salahaldeen.altous(a)leica-camera.com wrote:
> Hi,
> I have a stand alone device (without internet access) using iwd in Access point mode but some android phones connected to this device show no internet connection and switch back to WiFi home network.
Interesting. Not sure why they would do that if the user explicitly selected to
connect to your device...
> With different dhcp-server (dnsmasq) this problem have been solved by droping defaultroute in answered DHCP requests. How I can solve no internet connection with iwd and the built-in DHCP server.
I suppose we could use the same approach. Could you try the attached patch and
see if this helps.
Regards,
-Denis
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-dhcp-server-Omit-OPTION_ROUTER-if-not-configured.patch --]
[-- Type: text/x-patch, Size: 1010 bytes --]
From 2f114b84d3e990f2d1164cd2259556bbbcd0c2ec Mon Sep 17 00:00:00 2001
From: Denis Kenzior <denkenz@gmail.com>
Date: Fri, 5 Nov 2021 10:28:32 -0500
Subject: [PATCH] dhcp-server: Omit OPTION_ROUTER if not configured
Instead of assuming that OPTION_ROUTER should always be sent, and
setting it to the dhcp server's IP address, omit it entirely if the
gateway was not provided (i.e. l_dhcp_server_set_gateway was not
called.)
---
ell/dhcp-server.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/ell/dhcp-server.c b/ell/dhcp-server.c
index 9c0628a6c30e..c8b06a6ef409 100644
--- a/ell/dhcp-server.c
+++ b/ell/dhcp-server.c
@@ -1032,10 +1032,6 @@ LIB_EXPORT bool l_dhcp_server_start(struct l_dhcp_server *server)
server->address = ia.s_addr;
}
- /* Assign a default gateway if not already set */
- if (!server->gateway)
- server->gateway = server->address;
-
/* Assign a default netmask if not already */
if (!server->netmask) {
if (inet_pton(AF_INET,"255.255.255.0", &ia) != 1)
--
2.26.3
next reply other threads:[~2021-11-05 15:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-05 15:35 Denis Kenzior [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-11-07 9:32 IWD is running as AP with the build-in DHCP but android phones report no internet connection and switch back to WiFi home network salahaldeen.altous
2021-11-05 18:17 Denis Kenzior
2021-11-05 17:47 salahaldeen.altous
2021-11-05 15:14 salahaldeen.altous
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b29d30cd-7e96-3bed-4555-e79373f2dda9@gmail.com \
--to=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox