From: Roy Marples Date: Mon, 18 Dec 2023 12:22:13 +0000 (+0000) Subject: DHCP6: For Prefix Delegation, the - interface means no assignment X-Git-Tag: v10.0.6~1 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=01de6f23d323236b44d6d952fa0dab183db1d009;p=thirdparty%2Fdhcpcd.git DHCP6: For Prefix Delegation, the - interface means no assignment - is an invalid interface name. So we take this to mean don't assign the Delegated Prefix to any interfaces. The reject route for the Delegated Prefix is still installed. Fixes #270 --- diff --git a/src/dhcp6.c b/src/dhcp6.c index 6703f5cf..bdc3664e 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -3871,8 +3871,9 @@ dhcp6_activateinterfaces(struct interface *ifp) sla = &ia->sla[j]; ifd = if_find(ifp->ctx->ifaces, sla->ifname); if (ifd == NULL) { - logwarn("%s: cannot delegate to %s", - ifp->name, sla->ifname); + if (*sla->ifname != '-') + logwarn("%s: cannot delegate to %s", + ifp->name, sla->ifname); continue; } if (!ifd->active) { diff --git a/src/dhcpcd.conf.5.in b/src/dhcpcd.conf.5.in index 566b3727..878cdb8e 100644 --- a/src/dhcpcd.conf.5.in +++ b/src/dhcpcd.conf.5.in @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 4, 2023 +.Dd December 18, 2023 .Dt DHCPCD.CONF 5 .Os .Sh NAME @@ -359,6 +359,7 @@ Otherwise addresses are only assigned for each .Ar interface and .Ar sla_id . +To avoid delegating to any interface, use - as the invalid interface name. Each assigned address will have a .Ar suffix , defaulting to 1. @@ -415,6 +416,7 @@ interface eth0 ia_na 1 # request an IPv6 address ia_pd 2 eth1/0 # request a PD and assign it to eth1 ia_pd 3 eth2/1 eth3/2 # req a PD and assign it to eth2 and eth3 + ia_pd 4 - # request a PD but don't assign it .Ed .It Ic ipv4only Only configure IPv4.