Re: special options in dhcpcd
Roy Marples
Sun Apr 29 21:30:22 2018
Hi
On 29/04/2018 21:04, stephane@xxxxxxxxxxxxx wrote:
Hello all.
In order to make my dhcp6 requests work, I have to make a specific
request where 80 % of options are useless, but it's what it takes to
get my ISP's routers to let them through.
I particularly have to have options sol_max_rt, inf_max_rt, then 94,
95 and 96 (which are S64 map-e, map-t and 4over6).
I wonder how I can make those three last options.
Notice also that I am ok, if need be, to be tester. (I just have no
clue about how to program a dhcp client, ipv4 or 6).
I just looked up rfc7598 for option 94 and it went woosh over my head.
My understanding is that the DHCP client just requests these options in
the ORO. dhcpcd can then decode the contents for option use via a hook
script.
Attached is a patch to allow this.
You should be able to add this to dhcpcd.conf
# SOL_MAX and INF_MAX should already be requested by default
option dhcp6_sol_max_rt, dhcp6_inf_max_rt
# Request 94, 95 and 96
option dhcp6_s46_cont_mape, dhcp6_s46_cont_mapt, dhcp6_s46_cont_lw
You should then see the options appear as variables for use in
dhcpcd-run-hooks(8). However, I have no means of testing this. dhcpcd
cannot fully decode option 92 due to the options appearing AFTER a
variable length part. I have no interest in even attempting to fix this
as you've not noted it as a requirement.
Let me know how it works out for you!
Roy
diff --git a/src/dhcpcd-definitions.conf b/src/dhcpcd-definitions.conf
index f8117d27..625f8607 100644
--- a/src/dhcpcd-definitions.conf
+++ b/src/dhcpcd-definitions.conf
@@ -579,6 +579,37 @@ define6 80 ip6address link_address
define6 82 request uint32 sol_max_rt
define6 83 request uint32 inf_max_rt
+# DHCPv6 Softwire Address and Port-Mapped Clients
+define6 89 embed s46_rule
+embed binflags=0000000F flags
+embed byte ea_len
+embed byte prefix4_len
+embed ipaddress ipv4_prefix
+embed ip6address ipv6_prefix
+define6 90 ip6address s64_br
+define6 91 embed s46_dmr
+embed byte prefix_len
+embed binhex prefix
+define6 92 embed s46_v4v6bind
+embed ipaddress ipv4_address
+embed byte ipv6_prefix_len
+embed binhex ipv6_prefix_and_options
+# Cannot decode options after variable length address ...
+#encap 93 option
+define6 93 embed s46_portparams
+embed byte offset
+embed byte psid_len
+embed uint16 psid
+define6 94 embed s46_cont_mape
+encap 89 option
+encap 90 option
+define6 95 embed s46_cont_mapt
+encap 89 option
+encap 91 option
+define6 96 embed s46_cont_lw
+encap 90 option
+encap 92 option
+
# DHCPv6 Address Selection Policy
# Currently not supported
Archive administrator: postmaster@marples.name