]> git.lizzy.rs Git - plan9front.git/commit
ip/dhcp6d: work arround non-ethernet based client duid
authorcinap_lenrek <cinap_lenrek@felloff.net>
Tue, 31 Mar 2020 19:57:53 +0000 (21:57 +0200)
committercinap_lenrek <cinap_lenrek@felloff.net>
Tue, 31 Mar 2020 19:57:53 +0000 (21:57 +0200)
commitd3512f60df5d7a2ea5c4cad3cdef797f1f95a182
treed374b50d09b51d06ac4ee57b265c31a12205cec4
parent480ce0314ee6338644bc202aa68c13c06b1846ce
ip/dhcp6d: work arround non-ethernet based client duid

in ndb, we use the ethernet mac to identify the client.
in dhcpv6, there is just a uniqueue device id that
might even be generated randomly. to find the ethernet
address of a client, check the duid type and only use
it when the dudid is of type 1 (link layer) or 3 (link
layer address + time) and the link layer address type
is 1 (ethernet). otherwise, assume the source ip is
a link local address and extract it from that.

this hack works for thinkpad t495, which uses random
uuid based client duid.
sys/src/cmd/ip/dhcp6d.c