openwrt / odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
GNU General Public License v2.0
162 stars 98 forks source link

improve router advertisments #158

Closed ukleinek closed 3 years ago

ukleinek commented 4 years ago

This is actually only a PR for a single patch, it appears as more as the mirrors seems to be outdated.

I sent the patch to the openwrt-devel list, but this seems to be broken currently, so reproduce here for some visibility.

dedeckeh commented 4 years ago

A more robust and future proof solution would be to cache per interface the relevant routes which can be populated via the netlink interface (see netlink.c and handle_rtm_route in particular) and use this route info to populate the route information options. Via the netlink interface the valid/preferred lifetimes of the routes can be learned and would allow to get rid of scanning the /proc/net/ipv6_route file; which becomes a bottleneck once the routing table has a lot of entries; for every RA which is sent

dedeckeh commented 3 years ago

Closing PR as I won't merge the changes in its current state