Bug 248251 - Cannot define IPv6 alias in the same way as IPv4 aliases on 13-CURRENT
Summary: Cannot define IPv6 alias in the same way as IPv4 aliases on 13-CURRENT
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-net (Nobody)
Keywords: needs-qa, regression
Depends on:
Reported: 2020-07-24 21:16 UTC by Gordon Bergling
Modified: 2020-08-14 08:27 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Bergling freebsd_committer 2020-07-24 21:16:43 UTC
On a very recent -CURRENT, it isn't possible to define an ipv6 alias in the way you do for ipv4. Considering the following content of a /etc/rc.conf:

ifconfig_genet0="inet netmask"
ifconfig_genet0_alias0="inet netmask"
ifconfig_genet0_ipv6="inet6 fec0:db81:1::3 prefixlen 64"
ifconfig_genet0_ipv6_alias0="inet6 fec0:db81:1::ff preflixlen 64"

The ipv4 alias for genet0 is created but the ipv6 one isn't.
Comment 1 Evgeniy Khramtsov 2020-08-12 19:48:44 UTC

Do you still have this issue if you change

ifconfig_genet0_ipv6_alias0="inet6 fec0:db81:1::ff preflixlen 64"


ifconfig_genet0_alias1="inet6 fec0:db81:1::ff preflixlen 64"

Comment 2 Hans Petter Selasky freebsd_committer 2020-08-12 19:54:56 UTC

Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2020-08-13 08:13:41 UTC
@Gordon Can you confirm the reported behaviour is explicitly not reproducible in stable/12 at least, if not on prior CURRENT versions? If prior CURRENT versions are not affected, can you include a working revision to assist with bisection
Comment 4 Gordon Bergling freebsd_committer 2020-08-14 08:27:04 UTC
@hselasky: Thanks for spotting the typo, good catch.

@koobs: thats actually no regression. I first thought that an interface alias also depends the ip protocol version, like it is for the primary ip-address.

ifconfig_genet0="inet a.b.c.d ..."
ifconfig_genet0_ipv6="inet6 fec80:db81:..."

For the interface aliases there is no separated protocol separation. So basically Evgeniy was right. I solved the problem by using these entries in the rc.conf.

ifconfig_genet0_alias0="inet netmask"
ifconfig_genet0_alias1="inet6 fec0:db81:1::ff prefixlen 64"

That is also what the manual page of rc.conf(5) describes, so this PR can be closed.