Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug! need more judgement when install wireguard first!! #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

youxiaojie
Copy link

@youxiaojie youxiaojie commented Jun 30, 2020

Bug! because no issue label like other project in github, I report bug here!

When install wireguard and running, my route table become this:
root@OpenWrt:/usr/bin# ip route
default dev wg0 proto static scope link //added by wireguard
10.162.106.0/24 dev wg0 proto kernel scope link src 10.162.106.10
45.62.xx.xx via 192.168.1.1 dev eth0.2 proto static //modified by wireguard
172.16.0.0/16 dev br-lan proto kernel scope link src 172.16.0.1
192.168.1.0/24 dev eth0.2 proto kernel scope link src 192.168.1.180

stopped wireguard:
root@OpenWrt:/usr/bin# ip route
45.62.xx.xx via 192.168.1.1 dev eth0.2 proto static
172.16.0.0/16 dev br-lan proto kernel scope link src 172.16.0.1
192.168.1.0/24 dev eth0.2 proto kernel scope link src 192.168.1.180

so line
ip route add $server via $(ip route | awk '$1=="default" {print $3}')
need do more judge after install wireguard. otherwise ip command error. ip route command need an ip ,not wg0 interface name in this situation as in this example.

Bug! because no issue label like other project in github,  I report bug here!

When install wireguard, my route table become this:
root@OpenWrt:/usr/bin# ip route
default dev wg0 proto static scope link //added by wireguard
10.162.106.0/24 dev wg0 proto kernel scope link src 10.162.106.10 
45.62.xx.xx via 192.168.1.1 dev eth0.2 proto static  //modified by wireguard
172.16.0.0/16 dev br-lan proto kernel scope link src 172.16.0.1 
192.168.1.0/24 dev eth0.2 proto kernel scope link src 192.168.1.180 

so line 23
ip route add $server via $(ip route | awk '$1=="default" {print $3}')
need do more judge after install wireguard. otherwise ip command error. ip route command need an ip ,not wg0 interface name in this situation as in this example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant