DHCPv6 client in base
roy at marples.name
Sun Oct 13 20:20:49 UTC 2019
On 13/10/2019 20:32, Hiroki Sato wrote:
> Ben Woods <woodsb02 at gmail.com> wrote
> in <CAOc73CBzvRD0Je5+XQJ9_UqTP2_cgJvc7_7JTU0fjKBCVnTt-w at mail.gmail.com>:
> wo> On Fri, 11 Oct 2019 at 08:32, Ben Woods <woodsb02 at gmail.com> wrote:
> wo> As promised, I have completed my initial work to import dhcpcd into FreeBSD
> wo> base, and it is ready for review, testing and comment at the link below.
> wo> https://reviews.freebsd.org/D22012
> wo> As per the comment from brooks@, I have opted to have it installed in
> wo> parallel with dhclient (which remains the default).
> How do you want to proceed the discussion? I sent my view and made
> myself clear that importing dhcpcd into the base system as-is is not
> a good idea. What is your answer to my concerns? I also agree with
> Brooks about a need for sandboxing before the import if it will
> happen. Do you have any plan to add changes to the imported dhcpcd?
Sorry if it was not clear. The discussion involves what is the required
acceptance for Priviledge Seperation because this is quite new to me.
My current idea is to open DHCP, IPv6RA and DHCP6 ports, chroot, drop
privs and fork. This concept is pretty standard thus far. These are
listening ports only and will dry-run any received message through
dhcpcd's two commons paths:
1) extract address and routing information without applying it
2) environment option generation from the whole message
Once done, the message is passed verbatim back to dhcpcd for doing the
same tasks but actually configuring the host.
I've started work on implementing this and hopefully it will add value
and security. If anyone thinks this is wrong, or there is a better way
or I've missed something blazingly obvious, now is the time to tell me!
The tricky part will be handling BPF (for BOOTP and ARP) because of the
needs of how dhcpcd works. I think I'll need to spawn an unpriv process
per BPF as needed and this part will probably be implemeted last.
More information about the freebsd-net