1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-10 19:50:30 +08:00

fix(wg): stop signal handling

This commit is contained in:
源文雨
2024-07-12 00:25:49 +09:00
parent 02ad99abb2
commit da6ffcc283
6 changed files with 26 additions and 11 deletions

View File

@@ -14,9 +14,9 @@ func (n *NIC) Up() {
}
func (n *NIC) Down() {
execute("/sbin/ip", "link", "set", "dev", n.ifce.Name(), "down")
execute("/sbin/ip", "route", "del", n.subnet, "dev", n.ifce.Name())
for _, c := range n.cidrs {
execute("/sbin/ip", "route", "del", c, "dev", n.ifce.Name())
}
execute("/sbin/ip", "link", "set", "dev", n.ifce.Name(), "down")
}