radvd-project / radvd

radvd | Official repository: https://github.com/radvd-project/radvd
https://radvd.litech.org/
Other
203 stars 106 forks source link

Be more flexible with unicast client handling #121

Closed nomis closed 3 years ago

nomis commented 4 years ago

This adds an UnrestrictedUnicast option to allow radvd to respond to unicast solicitations from unknown clients and a ! prefix to the client address to stop radvd responding to specific clients.

        UnicastOnly on;
        UnrestrictedUnicast on; # Unknown clients will receive replies to router solicitations

        clients {
                fe80::1234:56ff:fe78:9abc; # Client that doesn't send its own router solicitations
                !fe80::fedc:baff:fe98:7654; # Client that should not receive router advertisements
        };

Config file parsing could probably be better, but ! is recognised as a string... perhaps an ignored_clients { } section or a string suffix like clients { fe80::fedc:baff:fe98:7654 ignored; } would be better?

reubenhwk commented 4 years ago

Is this still needed? Has the OnePlus 5 been updated to fix this issue? It seems very specific to add RADVD handling for a broken NDP implementation on a phone. I'd much rather see a fix for the phone than a workaround in RADVD.

nomis commented 4 years ago

OnePlus will never fix this. It is nearly impossible to get them to fix anything.

Even with this change I need to run radvd twice on the same interface. At a minimum it needs to be possible to run fully unicast and then block the OnePlus somewhere.

robbat2 commented 3 years ago

@stappersg @Neustradamus Can you give this PR a look? I'm on the same fence as @reubenhwk: it would be nice if the clients did the right thing, but we have no way to force it, esp for old clients.

@nomis can you write tests to go with it please?