summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-manager.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-07-09 17:18:53 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-07-12 02:39:43 +0200
commitd3e291fd62bdffab9fd3c71beb25aa8876f77178 (patch)
treed06d7acf7e76e0d684e6a0f844f80d336f4a26f6 /src/network/networkd-manager.c
parentnetwork: use string table for route protocol (diff)
downloadsystemd-d3e291fd62bdffab9fd3c71beb25aa8876f77178.tar.xz
systemd-d3e291fd62bdffab9fd3c71beb25aa8876f77178.zip
network: also show route protocol in debugging logs
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r--src/network/networkd-manager.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 69af9746e0..ec3bb47ea6 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -436,7 +436,8 @@ int manager_rtnl_process_route(sd_netlink *rtnl, sd_netlink_message *message, vo
if (DEBUG_LOGGING) {
_cleanup_free_ char *buf_dst = NULL, *buf_dst_prefixlen = NULL,
*buf_src = NULL, *buf_gw = NULL, *buf_prefsrc = NULL;
- char buf_scope[ROUTE_SCOPE_STR_MAX], buf_table[ROUTE_TABLE_STR_MAX];
+ char buf_scope[ROUTE_SCOPE_STR_MAX], buf_table[ROUTE_TABLE_STR_MAX],
+ buf_protocol[ROUTE_PROTOCOL_STR_MAX];
if (!in_addr_is_null(family, &dst)) {
(void) in_addr_to_string(family, &dst, &buf_dst);
@@ -450,12 +451,13 @@ int manager_rtnl_process_route(sd_netlink *rtnl, sd_netlink_message *message, vo
(void) in_addr_to_string(family, &prefsrc, &buf_prefsrc);
log_link_debug(link,
- "%s route: dst: %s%s, src: %s, gw: %s, prefsrc: %s, scope: %s, table: %s, type: %s",
+ "%s route: dst: %s%s, src: %s, gw: %s, prefsrc: %s, scope: %s, table: %s, proto: %s, type: %s",
type == RTM_DELROUTE ? "Forgetting" : route ? "Updating remembered" : "Remembering",
strna(buf_dst), strempty(buf_dst_prefixlen),
strna(buf_src), strna(buf_gw), strna(buf_prefsrc),
format_route_scope(scope, buf_scope, sizeof buf_scope),
format_route_table(table, buf_table, sizeof buf_table),
+ format_route_protocol(protocol, buf_protocol, sizeof buf_protocol),
strna(route_type_to_string(rt_type)));
}