summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c5
-rw-r--r--src/libsystemd/sd-rtnl/test-rtnl.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index 7f2e398b74..c50d0ea982 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -133,7 +133,8 @@ int sd_rtnl_message_route_set_scope(sd_rtnl_message *m, unsigned char scope) {
}
int sd_rtnl_message_new_route(sd_rtnl *rtnl, sd_rtnl_message **ret,
- uint16_t nlmsg_type, int rtm_family) {
+ uint16_t nlmsg_type, int rtm_family,
+ unsigned char rtm_protocol) {
struct rtmsg *rtm;
int r;
@@ -154,7 +155,7 @@ int sd_rtnl_message_new_route(sd_rtnl *rtnl, sd_rtnl_message **ret,
rtm->rtm_scope = RT_SCOPE_UNIVERSE;
rtm->rtm_type = RTN_UNICAST;
rtm->rtm_table = RT_TABLE_MAIN;
- rtm->rtm_protocol = RTPROT_BOOT;
+ rtm->rtm_protocol = rtm_protocol;
return 0;
}
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;