dhcpcd-discuss

Re: DHCPv6 and OPTION_USER_CLASS

Roy Marples

Sat Apr 21 09:48:30 2018

Hi Mattieu

On 20/04/2018 18:15, Mattieu Baptiste wrote:
On Thu, Apr 19, 2018 at 12:17 PM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
- DHCPv6 option 16 OPTION_VENDOR_CLASS: my ISP requires IANA
Enterprise Number 1038, and data set to "sagem".
So I have this in dhcpcd.conf:
vendclass 1038 sagem
But when I tcpdump the request, dhcpcd correctly set the enterprise
number, but the five characters of the data field are zeroed:
00 00 04 0e 00 05 00 00 00 00 00


Fixed here:
https://roy.marples.name/git/dhcpcd.git/commit/?id=b07a075609ced2d7f50145c5dc6bd6a504b90365

Great! I can confirm it works with the patch.

Yay!

- DHCPv6 option 11 OPTION_AUTH: my ISP requires a string of the form
"fti/xxxxxxx", where xxxxxxx is my customer id.
I have this in my dhcpcd.conf:
authtoken 0 "" 0 fti/xxxxxxx
But the option isn't added in the packet. Am I missing something?


You're missing setting the type of authentication to use.
Add this to dhcpcd.conf, ideally before the authtoken line:
authprotocol token

Let me know if this now fixes it for you!

Thanks, with that setting, the auth option is now sent.
But it seems to generate other things in the value field. dhcpcd sends
this as the authentication value:
00:00:00:de:84:97:45:46:59:f3:a6:66:74:69:2f:XX:XX:XX:XX:XX:XX:XX

Whereas my ISP seems to require that the value only contain the string
configured: "fti/xxxxxxx":
00:00:00:00:00:00:00:00:00:00:00:66:74:69:2f:XX:XX:XX:XX:XX:XX:XX

Is there a way to only send that?

Without looking at it in wireshark, this would be the RDM and Replay Detection fields?

It must be used, and the Replay Detection field must increase monotonically. To do otherwise is an RFC violaiton.

Before I add this to dhcpcd, can you test it please?
Edit src/auth.c, find the function get_next_rdm_monotonic and just return 0; at the top of it.

Also, what ISP are you using?

My ISP is Orange, in France. Their new optical fiber infrastructure
has been migrated from pppoe to ethernet+dhcp, but their dhcp servers
are a bit silly :(.


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
Archive administrator: postmaster@marples.name