dhcpcd-discuss

Re: Possible bug in parsing dhcpcd.conf version 9.1.4

Roy Marples

Sat Jul 25 14:25:40 2020

Hi John

On 25/07/2020 14:14, John Dough wrote:
The default configuration works flawlessly for all my networks,
however one wireless network needed a clientid to allow a proper
connection. I used the following configuration file, running version
9.1.4

/etc/dhcpcd.conf

duid

... other options ..

ssid <Offending Network>
clientid
noipv4ll

EOF

dhcpcd used the DUID to attempt the connection. I would have expected
that ssid specific configuration took precedence over config setup.
noipv4ll was working as expected, taking precedence over default
configuration.

Does this patch help?
Let me know!

Roy

diff --git a/src/if-options.c b/src/if-options.c
index 10b2b5dd..7620ba73 100644
--- a/src/if-options.c
+++ b/src/if-options.c
@@ -1023,6 +1023,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
 		}
 		ifo->options |= DHCPCD_CLIENTID;
 		ifo->clientid[0] = (uint8_t)s;
+		ifo->options &= ~DHCPCD_DUID;
 		break;
 	case 'J':
 		ifo->options |= DHCPCD_BROADCAST;

References:
Possible bug in parsing dhcpcd.conf version 9.1.4John Dough
Archive administrator: postmaster@marples.name