Skip to content

Commit

Permalink
Fix IPv6 route add/delete message log level
Browse files Browse the repository at this point in the history
We have D_ROUTE for route addition/deletion messages, which prints at
loglevel 3. Use that for IPv6, like we do for IPv4 to reduce terminal
spam for non-legacy-networking setups. Prvious code would print the
messages at --verb 1.

Signed-off-by: Steffan Karger <[email protected]>
Acked-by: Gert Doering <[email protected]>
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg27954.html
Signed-off-by: Gert Doering <[email protected]>
(cherry picked from commit b959b02b4f607628896b4092f7ddfa675e87d929)
  • Loading branch information
syzzer authored and cron2 committed Jan 5, 2024
1 parent 322b11a commit 9abf74c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/openvpn/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1938,10 +1938,10 @@ add_route_ipv6(struct route_ipv6 *r6, const struct tuntap *tt,
#endif

#ifndef _WIN32
msg( M_INFO, "add_route_ipv6(%s/%d -> %s metric %d) dev %s",
msg(D_ROUTE, "add_route_ipv6(%s/%d -> %s metric %d) dev %s",
network, r6->netbits, gateway, r6->metric, device );
#else
msg( M_INFO, "add_route_ipv6(%s/%d -> %s metric %d) IF %lu",
msg(D_ROUTE, "add_route_ipv6(%s/%d -> %s metric %d) IF %lu",
network, r6->netbits, gateway, r6->metric,
r6->adapter_index ? r6->adapter_index : tt->adapter_index);
#endif
Expand Down Expand Up @@ -2392,7 +2392,7 @@ delete_route_ipv6(const struct route_ipv6 *r6, const struct tuntap *tt,
}
#endif

msg( M_INFO, "delete_route_ipv6(%s/%d)", network, r6->netbits );
msg(D_ROUTE, "delete_route_ipv6(%s/%d)", network, r6->netbits );

#if defined(TARGET_LINUX)
metric = -1;
Expand Down

0 comments on commit 9abf74c

Please sign in to comment.