Added captive-portal DHCP option to database.

But I am afraid dnsmasq can serve different URLs only for explicitly registered clients with separate options. It cannot make the url dynamically based on incoming request. There is no script able to customize offered options online.

On 5/26/23 09:16, Florian Baaske via Dnsmasq-discuss wrote:

Hi,
I would like to setup a Guest network with DNSMASQ. For that Guest network, I would like to use CAPPORT or RFC8908. To make this work, the DHCP server needs to send option 114, which should not be a problem, but option 114 should have the URL to the CAPPORT server including the MAC address of the client. So, my questions would be, is it possible to include the clients MAC address in the DHCP response? I have found a solution for ISC DHCP but was not able to find anything for DNSMASQ. If someone could help, this would be much appreciated.

BR
Florian


_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

--
Petr Menšík
Software Engineer, RHEL
Red Hat,https://www.redhat.com/
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
From e0674d8ae1737f00e89bf9fbb87a1369174f5751 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemen...@redhat.com>
Date: Fri, 26 May 2023 11:31:12 +0200
Subject: [PATCH] Add captive-portal DHCP options entry

Defined by RFC 8910 it adds string defining URL with the information
about captive portal.

RA option is not defined.
---
 src/dhcp-common.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/dhcp-common.c b/src/dhcp-common.c
index b004e40..c3b978b 100644
--- a/src/dhcp-common.c
+++ b/src/dhcp-common.c
@@ -685,7 +685,8 @@ static const struct opttab_t {
   { "client-machine-id", 97, 0 },
   { "posix-timezone", 100, OT_NAME }, /* RFC 4833, Sec. 2 */
   { "tzdb-timezone", 101, OT_NAME }, /* RFC 4833, Sec. 2 */
-  { "ipv6-only", 108, 4 | OT_DEC },  /* RFC 8925 */ 
+  { "ipv6-only", 108, 4 | OT_DEC },  /* RFC 8925 */
+  { "captive-portal", 114, OT_NAME }, /* RFC 8910 */
   { "subnet-select", 118, OT_INTERNAL },
   { "domain-search", 119, OT_RFC1035_NAME },
   { "sip-server", 120, 0 },
@@ -727,6 +728,7 @@ static const struct opttab_t opttab6[] = {
   { "ntp-server", 56, 0 /* OT_ADDR_LIST | OT_RFC1035_NAME */ },
   { "bootfile-url", 59, OT_NAME },
   { "bootfile-param", 60, OT_CSTRING },
+  { "captive-portal", 103, OT_NAME }, /* RFC 8910 */
   { NULL, 0, 0 }
 };
 #endif
-- 
2.40.1

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to