Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base6Interface ppp0 and prefix ::/64 #134

Open
vp1981 opened this issue Dec 9, 2020 · 5 comments
Open

Base6Interface ppp0 and prefix ::/64 #134

vp1981 opened this issue Dec 9, 2020 · 5 comments

Comments

@vp1981
Copy link

vp1981 commented Dec 9, 2020

Hello,
my Internet provider gives me IPv6 /48 (/64) and I tried to provide IPv6 addresses to my LAN using radvd. I use the following code:

interface br0 {
  prefix ::/64 {
    AdvOnLink on;
    AdvAutonomous on;
    AdvRouterAddr on;
    Base6Interface ppp0;
  };
};

If I understand radvd.conf(5) correctly, with ::/64 radvd should pick up address from ppp0 device and advertise /64 to LAN but radvd reports error:

$ LANG=en_US.UTF-8 sudo systemctl status radvd.service
...
Dec 09 21:26:04 smoon7.bkoty.ru radvd[14398]: [Dec 09 21:26:04] radvd (14398): version 2.19 started
Dec 09 21:26:04 smoon7.bkoty.ru radvd[14398]: [Dec 09 21:26:04] radvd (14398): ifa_addr == NULL for dev ppp0 !? Ignoring in add_auto_prefixes
Dec 09 21:26:04 smoon7.bkoty.ru systemd[1]: Started IPv6 Router Advertisement Daemon.
Dec 09 21:26:20 smoon7.bkoty.ru radvd[14398]: [Dec 09 21:26:20] radvd (14398): ifa_addr == NULL for dev ppp0 !? Ignoring in add_auto_prefixes
Dec 09 21:26:36 smoon7.bkoty.ru radvd[14398]: [Dec 09 21:26:36] radvd (14398): ifa_addr == NULL for dev ppp0 !? Ignoring in add_auto_prefixes

Do I do something wrong or it is expected behaviour?

P.S. radvd.conf(5) says that ::/64 is supported only if getifaddrs works but I don't know if it should work with ppp.

@vp1981
Copy link
Author

vp1981 commented Dec 10, 2020

Ok, I found when this message was introduced (by commit 0d891e8) and why and I remember I reported (but don't remember when and for what project) about getifaddrs strange behavior on other interface (teredo). Then I could consider the radvd behavior as intended but then it confuses me with Base6Interface and Base6to4Interface. The latter could work with ppp0 (I see example in radvd.conf(5)).

If I'm right that Base6Interface is (very) different from Base6to4Interface (regarding to ppp0), is it possible to make the former work with ppp0 as well?

P.S. I'm thinking of writing small script to get IPv6 /64 from ppp0, inserting code into radvd.conf and restarting radvd but it feels as wrong approach.

@vp1981
Copy link
Author

vp1981 commented Dec 11, 2020

Hello,
I might be wrong about my interpretation of the issue. I used example from getifaddrs(3), added small part and run on some hosts. It seems getifaddrs works fine even for ppp0 and teredo. The "devices" are listed several times if they have both IPv4 and IPv6 or several of them and ppp0 as well as teredo are not exception here. What makes ppp0 and teredo special is that they are not only examined several times but they always (?) return NULL for address (ifa_addr) field for first call while traversing the ifaddrs list.

Now what bothers me is that radvd outputs the warning continuously as if it scans radvd.conf periodically (I didn't investigate the code) and reports again and again about NULL though it may be not so wrong. May be change the LOG level to DEBUG,

flog(LOG_WARNING, ...) -> dlog(LOG_DEBUG, ...)

?

P.S. I did tests on my Archlinux x86_64 system with 5.9.13 kernel, I don't know if getifaddrs would work the same way with other kernels, other Linux flavors or *BSD systems; I simply don't know how to prepare test environment (with ppp0 and teredo).

@vp1981
Copy link
Author

vp1981 commented Dec 11, 2020

I run radvd -d 5 -m logfile -l /tmp/radvd.log and see that radvd actually uses IPv6 address on ppp0, so this message is misleading and I think it is better to change log level to DEBUG.

@Neustradamus
Copy link
Member

@vp1981: What is the situation in 2024?
Have you tested the 2.20-rc1 from 2023-11-17, one year ago?

@vp1981
Copy link
Author

vp1981 commented Nov 28, 2024

Hello.
I'm sorry, but I stopped using radvd, so I can't give any feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants