mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-05 16:00:28 +08:00
fix mtu on win
This commit is contained in:
@@ -11,7 +11,8 @@ func (n *NIC) Up() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
execute("cmd", "/c", "netsh interface ip set address name=\""+n.ifce.Name()+"\" source=static addr=\""+n.ip+"\" mask=\""+(net.IP)(ipn.Mask).String()+"\" gateway=none mtu="+n.mtu)
|
||||
execute("cmd", "/c", "netsh interface ip set address name=\""+n.ifce.Name()+"\" source=static addr=\""+n.ip+"\" mask=\""+(net.IP)(ipn.Mask).String()+"\" gateway=none")
|
||||
execute("cmd", "/c", "netsh interface ipv4 set subinterface \""+n.ifce.Name()+"\" mtu="+n.mtu)
|
||||
for _, c := range n.cidrs {
|
||||
ip, cidr, err := net.ParseCIDR(c)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user