Import dhcpcd(8) into FreeBSD base.
This introduces DHCPv6 functionality to FreeBSD, and when used can also replace dhclient(8) and rtsol(8).
This exists in parallel with both of these existing tools, which continue to be the default. This can be changed by:
- setting dhcp_client="dhcpcd" in /etc/rc.conf
- removing rtsold_enable from /etc/rc.conf
- removing ifconfig_em0_ipv6="inet6 accept_rtadv" from /etc/rc.conf
- enabling dhcpcd(8) using one of the two methods below
Once set as the default, dhcpcd(8) can be used in 2 different modes:
1. Master mode - by setting dhcpcd_enable="YES" in /etc/rc.conf.
This will enabled dhcpcd(8) for all network interfaces (except those
that cannot utilise DHCP - such as firewire, tap and bridge).
By default, dhcpcd(8) will try to configure DHCPv4 and DHCPv6.
Consider modifying dhcpcd.conf(5) to further configure per interface
settings in this mode.
2. Interface mode - by setting the following parameters in /etc/rc.conf:
ifconfig_em0="DHCP"
ifconfig_em0_ipv6="DHCP"
Setting these will enable DHCPv4 and DHCPv6 respectively on the
specified interface. These can be set independently of each other.
dhcpcd_enable should not be set in this mode (it defaults to "NO").
Future improvements which could be made to FreeBSD to improve dhcpcd(8):
- addition of address flags and process id to ifa_msghdr
- kernel does not support route message filtering
- kernel does not allow IPv6 address sharing
- No SIOCGIFALIAS support
- cannot detect route socket overflow within kernel
- kernel does not report IPv6 address flag changes
- kernel does not support userland sending ND6 advertisements
Future improvements which could be made to dhcpcd(8) to improve security on FreeBSD:
- privilege separation
- capsicumize