dhcpcd-discuss

Re: DHCPv6 and OPTION_USER_CLASS

Roy Marples

Thu Apr 26 07:31:51 2018

Hi Mattie, sorry for the late reply

On 23/04/2018 17:43, Mattieu Baptiste wrote:
Yes, you're right. It doesn't make a difference.
Now, I can't see a reason why the server doesn't reply...
The three important options my ISP requires are precisely the same
between a request sent by the official modem and a request sent by
dhcpcd.
There are minor differences on other options, but I don't see what
would be the reason it fails.
What comes to mind...
- with dibbler, we need to set the "auth" option twice; otherwise it
doesn't work. Maybe the server doesn't like the options order in the
packet?
- the official modem and dibbler both requests the "auth" option in
the "option request" option, whereas dhcpcd don't. Maybe I need to
send that?
I'm a bit desperate on what's the problem of my ISP's crappy DHCP server...


The attached patch should work.
I'm not in a position to test it yet, maybe you could?

The option order should not matter.

Roy
diff --git a/src/dhcp6.c b/src/dhcp6.c
index 6e470a98..a6e2bbd8 100644
--- a/src/dhcp6.c
+++ b/src/dhcp6.c
@@ -3705,6 +3705,8 @@ dhcp6_start1(void *arg)
 		if (ifo->fqdn != FQDN_DISABLE ||
 		    ifo->options & DHCPCD_HOSTNAME)
 			add_option_mask(ifo->requestmask6, D6_OPTION_FQDN);
+		if (ifo->auth.options & DHCPCD_AUTH_SENDREQUIRE)
+			add_option_mask(ifo->requestmask6, D6_OPTION_AUTH);
 	}
 
 #ifndef SMALL

Follow-Ups:
Re: DHCPv6 and OPTION_USER_CLASSMattieu Baptiste
References:
DHCPv6 and OPTION_USER_CLASSMattieu Baptiste
Re: DHCPv6 and OPTION_USER_CLASSRoy Marples
Re: DHCPv6 and OPTION_USER_CLASSMattieu Baptiste
Re: DHCPv6 and OPTION_USER_CLASSRoy Marples
Re: DHCPv6 and OPTION_USER_CLASSMattieu Baptiste
Re: DHCPv6 and OPTION_USER_CLASSRoy Marples
Re: DHCPv6 and OPTION_USER_CLASSMattieu Baptiste
Re: DHCPv6 and OPTION_USER_CLASSRoy Marples
Re: DHCPv6 and OPTION_USER_CLASSMattieu Baptiste
Archive administrator: postmaster@marples.name