Bug 237748 - net/dhcp6 fails to configure prefix on loopback device
Summary: net/dhcp6 fails to configure prefix on loopback device
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Hiroki Sato
URL: https://lists.freebsd.org/pipermail/f...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-04 14:36 UTC by Dries Michiels
Modified: 2020-06-22 20:45 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (hrs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dries Michiels 2019-05-04 14:36:33 UTC
Hi,

I'm trying to assign a 64 prefix on a cloned loopback device (lo1). This prefix will be used by IPFW in NPTv6 to make my jails ipv6 accessible.

My dhcp6c.conf file:

interface em0 {
        send ia-na 0;
        send ia-pd 0;
        send rapid-commit;
};

id-assoc na { };

id-assoc pd {
        prefix ::/56 infinity;
        prefix-interface igb0 {
                sla-id 0;
                sla-len 8;
        };
        prefix-interface lo1 {
                sla-id 1;
                sla-len 8;
        };
};

Debug output when running in foreground mode with -D flag:
May  4 16:24:45 vados dries[70999]: /usr/local/etc/rc.d/dhcp6c: WARNING: failed to start dhcp6c
May  4 16:25:14 vados dhcp6c[91112]: link layer address is too short (lo1)
May  4 16:25:14 vados dhcp6c[91112]: failed to get default IF ID for lo1
May  4 16:25:14 vados dhcp6c[91112]: failed to parse configuration file
Comment 1 Dries Michiels 2019-05-05 11:25:27 UTC
I found that net/dhcpcd can do this. Maybe interesting in the long term to import that one in base? Maybe even completely getting rid of dhclient. Dhcpcd can do both IP protocols in one config file.
Comment 2 Dries Michiels 2020-06-14 10:51:16 UTC
This software is not able to configure prefixes on non physical interfaces such as a the loopback interface. This is merely a deficit of net/dhcp6 and will not be fixed or added as extra functionallity. Better to use net/dhcpcd which also uses privilege separation and capsicum.
Comment 3 Hiroki Sato freebsd_committer 2020-06-22 20:45:53 UTC
(In reply to Dries Michiels from comment #2)
You have to configure an LLA to lo1 if you want to use it for IA-PD.
For example:

# ifconfig lo1 inet6 fe80::1/64