diff options
author | Dan Williams <dcbw@redhat.com> | 2014-07-22 16:54:47 -0500 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-07-23 09:19:32 +0200 |
commit | 28cc555d8504c9429776aedbbe1fee7101258578 (patch) | |
tree | 9b681a3243156df7113eaf82ad5811c8a6138a1f /src/libsystemd/sd-rtnl/test-rtnl.c | |
parent | 82eb1e7efbe3ca8620d2b183af37c4fd34bf8bb3 (diff) |
networkd: set route protocol
All routes added by networkd are currently set RTPROT_BOOT, which according
to the kernel means "Route installed during boot" (rtnetlink.h). But this
is not always the case as networkd changes routing after boot too. Since
the kernel gives more detailed protocols, use them.
With this patch, user-configured static routes now use RTPROT_STATIC (which
they are) and DHCP routes use RTPROT_DHCP. There is no define for IPv4LL
yet, so those are installed as RTPROT_STATIC (though perhaps RTPROT_RA is
better?).
[tomegun: fixup
src/network/networkd-link.c:972:33: error: too few arguments to function 'route_new_dynamic']
Diffstat (limited to 'src/libsystemd/sd-rtnl/test-rtnl.c')
-rw-r--r-- | src/libsystemd/sd-rtnl/test-rtnl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-rtnl/test-rtnl.c b/src/libsystemd/sd-rtnl/test-rtnl.c index 082c9e4a01..4b6e5339d9 100644 --- a/src/libsystemd/sd-rtnl/test-rtnl.c +++ b/src/libsystemd/sd-rtnl/test-rtnl.c @@ -132,7 +132,7 @@ static void test_route(void) { uint32_t index = 2, u32_data; int r; - r = sd_rtnl_message_new_route(NULL, &req, RTM_NEWROUTE, AF_INET); + r = sd_rtnl_message_new_route(NULL, &req, RTM_NEWROUTE, AF_INET, RTPROT_STATIC); if (r < 0) { log_error("Could not create RTM_NEWROUTE message: %s", strerror(-r)); return; |