Don't add Excluded routes when Table=off
This commit is contained in:
parent
4b9fa05b5c
commit
251b565bdb
|
@ -153,9 +153,9 @@ bool WireguardProcessor::ConfigureTun() {
|
||||||
|
|
||||||
config.mtu = mtu_;
|
config.mtu = mtu_;
|
||||||
config.pre_post_commands = pre_post_;
|
config.pre_post_commands = pre_post_;
|
||||||
config.excluded_routes = excluded_ips_;
|
|
||||||
|
|
||||||
if (add_routes_mode_) {
|
if (add_routes_mode_) {
|
||||||
|
config.excluded_routes = excluded_ips_;
|
||||||
// For each peer, add the extra routes to the extra routes table
|
// For each peer, add the extra routes to the extra routes table
|
||||||
for (WgPeer *peer = dev_.first_peer(); peer; peer = peer->next_peer_) {
|
for (WgPeer *peer = dev_.first_peer(); peer; peer = peer->next_peer_) {
|
||||||
for (auto it = peer->allowed_ips_.begin(); it != peer->allowed_ips_.end(); ++it) {
|
for (auto it = peer->allowed_ips_.begin(); it != peer->allowed_ips_.end(); ++it) {
|
||||||
|
|
Loading…
Reference in a new issue