relayd: put rule requests on stack Signed-off-by: Felix Fietkau <nbd@openwrt.org>
fix attribute alignment for rules Signed-off-by: Felix Fietkau <nbd@openwrt.org>
rules: process rules after the local table to ensure that local access still works Signed-off-by: Felix Fietkau <nbd@openwrt.org>
route: fix an uninitialized variable Detected by Coverity CID 1331189 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
route: fix an error with strict-aliasing Signed-off-by: Felix Fietkau <nbd@openwrt.org>
route.c: include time.h, required for eglibc and glibc based systems
implement local ip access through policy routing
rule: two boolean parameters with a flags field
split off code for sending an rtnl dump request
Implement a workaround for the policy routing gateway bug A host route must be reachable from the default rule lookup when using it to set a gateway, so before we can add a route with a gateway, we temporarily inject a bogus IP rule pointing at the correct table. As soon as the route is set, we can remove the bogus IP rule.
Add default gateway and DHCP handling (not fully working yet because of a kernel bug)
Use policy routing to limit the scope of the host routes to affected interfaces
Preinitialize more fields of the RTNL request
Flush the route cache after changing routes
Move the rtnl code to a separate source file