-
Notifications
You must be signed in to change notification settings - Fork 104
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
router: add option to include custom routes in RA #224
base: master
Are you sure you want to change the base?
Conversation
I think this is a good option to have. @DavidB137 please fix the conflicts. |
Resolves merge conflicts in pull request openwrt#224. Signed-off-by: Dávid Benko <[email protected]>
d52aee0
to
b8f6ff0
Compare
Sorry, I messed up quite a bit when resolving the conflicts. At first, I used spaces instead of tabs for indentation and then tried to fix it (unsuccessfully). So I instead synced my fork with upstream and reapplied the changes which should also make the history cleaner as there's no merge commit. Once again, sorry for the confusion. @systemcrash Hopefully you can merge now. |
I wonder whether it'd be better to call them |
Introduces new configuration option `ra_staticroute` for adding custom route(s) in route advertisement (RA) messages when no default route is advertised. This is useful when, for example, end devices are given only ULA IPv6 addresses (e.g. from fc00:0:100::/48), but one still needs inter subnet communication to e.g. fc00:0:200::/48. Currently, this wouldn't be possible without static route on each end device as the odhcpd server doesn't present itself as default router and no route information is given except for local ULA subnet (fc00:0:100::/48). New configuration option `ra_staticroute` makes it possible to advertise arbitrary routes to the end devices and thus making correct routing possible even when no default route (or public IPv6 prefix) is available. Option `ra_staticroute` exists under both `odhcpd` section and interfaces' sections. Latter sets up interface-specific routes. Routes configured under `odhcpd` are global and advertised for all interfaces (including those with interface-specific static routes). Config example: config odhcpd 'odhcpd' ... list ra_staticroute 'fc00:10::/32' list ra_staticroute 'fc00:20::/32' config dhcp 'lan' ... list ra_staticroute 'fd50:60:70::/48' Fixes: openwrt#74 Signed-off-by: Dávid Benko <[email protected]>
I completely agree with you, I renamed everything, did some refactoring, removed unnecessary dynamic memory allocation and improved error handling. I squashed everything together now. @systemcrash Let me know if you want to change anything else. |
This still looks great - more readable now. Could you update your initial post example please? |
Updated |
Introduces new configuration option
ra_staticroute
for adding custom route(s) in route advertisement (RA) messages when no default route is advertised.This is useful when, for example, end devices are given only ULA IPv6 addresses (e.g. from
fc00:0:100::/48
), but one still needs inter subnet communication to e.g.fc00:0:200::/48
. Currently, this wouldn't be possible without static route on each end device as the odhcpd server doesn't present itself as default router and no route information is given except for local ULA subnet (fc00:0:100::/48
).New configuration option
ra_staticroute
makes it possible to advertise arbitrary routes to the end devices and thus making correct routing possible even when no default route (or public IPv6 prefix) is available.Option
ra_staticroute
exists under bothodhcpd
section and interfaces' sections. Latter sets up interface-specific routes. Routes configured underodhcpd
are global and advertised for all interfaces (including those with interface-specific static routes).Config example:
Fixes: #74 and possibly helps with #152