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]>
  • Loading branch information
syzzer authored and cron2 committed Jan 5, 2024
1 parent a9fe012 commit 7268e14
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/openvpn/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1940,12 +1940,12 @@ 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",
network, r6->netbits, gateway, r6->metric, device );
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",
network, r6->netbits, gateway, r6->metric,
r6->adapter_index ? r6->adapter_index : tt->adapter_index);
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 @@ -2394,7 +2394,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)
int metric = -1;
Expand Down

0 comments on commit 7268e14

Please sign in to comment.