]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP6: For Prefix Delegation, the - interface means no assignment
authorRoy Marples <roy@marples.name>
Mon, 18 Dec 2023 12:22:13 +0000 (12:22 +0000)
committerRoy Marples <roy@marples.name>
Mon, 18 Dec 2023 12:22:13 +0000 (12:22 +0000)
- 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

src/dhcp6.c
src/dhcpcd.conf.5.in

index 6703f5cf43f2edf393ae37adb4cca51681711a40..bdc3664e2607ff6aa7db6671d787ed5a74be526f 100644 (file)
@@ -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) {
index 566b3727a5dbf8327e0a8e996d4483300409f61c..878cdb8e022b1ccda916a8a09d73ad6596fdd926 100644 (file)
@@ -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.