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

Allow setting preferred source address in routes per interface via config file #18

Closed
wants to merge 1 commit into from

Conversation

christf
Copy link
Contributor

@christf christf commented Aug 4, 2018

this replaces #15 and is directed towards the unicast branch.

With this patch, we can set preferred source address stanzas in routes for each interface using a configuration like this:
interface babel-vpn-1374 type tunnel link-quality true update-interval 300 pref-src aaaa:bbbb:cccc:dddd:eeee::fffff

@jech
Copy link
Owner

jech commented Oct 25, 2018

Agreed in principle. Please provide a clean patch series, preferably just a single patch, and preferably against rfc6126bis.

@christf
Copy link
Contributor Author

christf commented Nov 4, 2018

the patch towards rfc6126bis was raised via mailing list.

@christf christf changed the base branch from unicast to master November 11, 2018 17:25
@christf
Copy link
Contributor Author

christf commented Nov 11, 2018

with the current branching model I am getting confused with the PRs.

@jech
Copy link
Owner

jech commented Dec 22, 2018

The first and last patches are no longer relevant. The second patch (the manpage typo) I've applied.

As to the main patch, it has a bug: use_prefsrc should be set to CONFIG_YES, otherwise the MERGE macro won't work.

Rather than using an extra boolean in the config, I recommend simply setting the prefix to all-zeroes if it is not set, and checking whether it's all zeroes before passing it to the kernel. This avoids having the same information in two places, which risks having inconsistent data.

This preferred source address will be added as prefsrc stanza to each
exported route via this interface. For this the interface configuration
is extended by the parameter pref-src requiring an ipv6 address as
argument.
@christf
Copy link
Contributor Author

christf commented Dec 28, 2018

reworked to include review comments.

@jech
Copy link
Owner

jech commented Mar 31, 2019

Sorry for the delay, but I was waiting for @killianlufau to submit #31.

I haven't looked at the code in #31 yet, but I rather like the idea of attaching source addresses to install filters rather than to the interface configuration. @christf, I'd like to hear your opinion.

@christf
Copy link
Contributor Author

christf commented Apr 2, 2019 via email

@jech
Copy link
Owner

jech commented Apr 3, 2019

@christf I'm hoping to find the time to review #31 next week. If you beat me to it, I'd be grateful if you could comment on whether I should apply #31 as it is, or whether you have changes to suggest.

@jech
Copy link
Owner

jech commented Jun 21, 2019

Killian,

  • your first patch does not compile, please fix that.
  • please keep the plen parameter to find_table, unused parameters are okay, carrying a prefix without the associated plen is not;

In the second patch:

  • please change the patch summary to "Add install filter parameter pref_src" or something;
  • in change_route, please split the conditional into two: first m = install_filter(...) then if(m < INFINITY);
  • on this subject — should the check for m < INFINITY be here or in kernel_route? I don't mind either way, but I'm wondering.
  • please add documentation to the manual page.

Other than that, it looks good to me.

@rotanid
Copy link

rotanid commented Jun 21, 2019

@jech this PR is not by kilian, but #31 is

@jech
Copy link
Owner

jech commented Jun 25, 2019

@rotanid, right, this was about #31. Since @killianlufau is progressing nicely, I'm closing this request in favour of his. (Thanks for your work, @christf.)

@jech jech closed this Jun 25, 2019
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