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

Disable neighbour acquisition #64

Closed
wants to merge 2 commits into from

Conversation

MisterDA
Copy link
Contributor

Hi!
This is a prototype for disabling neighbour acquisition in babeld, as suggested in #58. I’m currently testing it ;-)
The first patch adds a global option, neighbour-acquisition, that is true by default, and when disabled will prevent babeld from sending multicast hellos (that may or may not be suitable, if that’s a bad idea, I’ll remove the feature) and prevents babeld from ever creating neighbours.
The second patch adds a way to add and flush neighbours from the configuration interface.

This allows to disable neighbour acquisition by babeld, by cancelling
traditionnal mechanisms. By default, this option is enabled. When this
option is disabled, babeld won't:
- send Multicast Hellos;
- add a new neighbour to its neighbour table when it receives a packet
  from a new neighbour.

Neighbours must be added via an external mechanism, yet to be defined.
Neighbours can be added the config line:

    neighbour <address> <ifname>

and flushed via the local configuration interface with:

    flush neighbour <address> <ifname>
@jech
Copy link
Owner

jech commented Oct 1, 2020

I assume this is about Wireguard support? Did you try to find out what exactly is needed in order to get babeld to work with Wireguard with minimal configuration?

First, I don't think that neighbour-acquisition should be a global option — it should be per-interface.

Second, what prevents a statically-configured neighbour from timing out? I think we need a static flag that prevents such neighbours from expiring.

Third, the function flush_neigbour2 duplicates code. Why not do

neigh = find_neighbour(...);
if(neigh != NULL)
    flush_neighbour(neigh);

@MisterDA
Copy link
Contributor Author

MisterDA commented Oct 1, 2020 via email

@jech
Copy link
Owner

jech commented Oct 1, 2020 via email

@snh
Copy link

snh commented Oct 5, 2020

What WireGuard topology do you have in mind for this?

The reason I ask is that a simple two peer WireGuard topology with 0.0.0.0/0 and/or ::/0 as the WireGuard AllowedIPs in both directions works fine with babeld with no tweaks required.

As a result, a common scenario when using babeld with WireGuard is to have a separate WireGuard internface/tunnel per host pair.

Anything more complex is likely to be constrained by WireGuard's cryptokey routing unless babeld was to dynamically adjust the WireGuard AllowedIPs on the fly, as peers on the same WireGuard interface cannot use overlapping AllowedIPs due to the fundamental way the routing works in WireGuard.

@MisterDA
Copy link
Contributor Author

Hi! There’s a lot to the subject that I haven’t yet understood, I’m withdrawing these patches. Sorry for the noise and the wasted time.

@MisterDA MisterDA closed this Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants