From 13a58f9590a7071ad4a8c8f7e4178c29a6b66be3 Mon Sep 17 00:00:00 2001 From: Florent Fourcot Date: Thu, 20 Jun 2019 10:26:40 +0200 Subject: [PATCH] Add dhcp-ignore-clid configuration option The idea of this option was already discussed years ago on the mailing list: https://dnsmasq-discuss.thekelleys.org.narkive.com/ZoFQNaGo/always-ignore-client-identifier#post4 In our production environnement, we discovered that some devices are using 'client identifier' not unique at all, resulting on IP addresses conflicts between several devices (we saw up to four devices using same IP address). The root cause is probably a buggy operating system/configuration of decices, but this patch add a configuration workaround on server side when fixing clients is impossible. Signed-off-by: Charles Daymand Signed-off-by: Florent Fourcot --- CHANGELOG | 5 ++++- man/dnsmasq.8 | 6 ++++++ man/fr/dnsmasq.8 | 7 +++++++ src/dnsmasq.h | 3 ++- src/option.c | 3 +++ src/rfc2131.c | 2 +- 6 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b737f44..2e646e1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -50,7 +50,10 @@ version 2.81 with the exception that NSEC and NSEC3 RRs must always be signed. Thanks to Tore Anderson for spotting and diagnosing the bug. - + Add --dhcp-ignore-clid. This disables reading of DHCP client + identifier option (option 61), so clients are only identified by + MAC addresses. + version 2.80 Add support for RFC 4039 DHCP rapid commit. Thanks to Ashram Method for the initial patch and motivation. diff --git a/man/dnsmasq.8 b/man/dnsmasq.8 index bc5ae63..9d5d4d0 100644 --- a/man/dnsmasq.8 +++ b/man/dnsmasq.8 @@ -1405,6 +1405,12 @@ address, and setting this flag enables this mode. Note that in the sequential mode, clients which allow a lease to expire are much more likely to move IP address; for this reason it should not be generally used. .TP +.B --dhcp-ignore-clid +Dnsmasq is reading 'client identifier' (RFC 2131) option sent by clients +(if available) to identify clients. This allow to serve same IP address +for a host using several interfaces. Use this option to disable 'client identifier' +reading, i.e. to always identify a host using the MAC address. +.TP .B --pxe-service=[tag:,],[,|][,|] Most uses of PXE boot-ROMS simply allow the PXE system to obtain an IP address and then download the file specified by diff --git a/man/fr/dnsmasq.8 b/man/fr/dnsmasq.8 index a04c776..dc2fdc0 100644 --- a/man/fr/dnsmasq.8 +++ b/man/fr/dnsmasq.8 @@ -1354,6 +1354,13 @@ Veuillez noter que dans ce mode séquentiel, les clients qui laissent expirer leur bail ont beaucoup plus de chance de voir leur adresse IP changer, aussi cette option ne devrait pas être utilisée dans un cas général. .TP +.B --dhcp-ignore-clid +Dnsmasq lit l'option 'client identifier' (RFC 2131) envoyée par les clients +(si disponible) afin d'identifier les clients. Cela permet de distribuer la +même adresse IP à un client utilisant plusieurs interfaces. Activer cette option +désactive la lecture du 'client identifier', afin de toujours identifier un client +en utilisant l'adresse MAC. +.TP .B --pxe-service=[tag: