mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-27 06:10:26 +08:00
fix: use nic mtu that minus packet header
This commit is contained in:
@@ -5,7 +5,7 @@ package lower
|
||||
|
||||
import "net"
|
||||
|
||||
func (n *NIC) Up() {
|
||||
func (n *NICIO) Up() {
|
||||
execute("ifconfig", n.ifce.Name(), "mtu", n.mtu) // max: 9159
|
||||
execute(
|
||||
"ifconfig", n.ifce.Name(),
|
||||
@@ -19,7 +19,7 @@ func (n *NIC) Up() {
|
||||
}
|
||||
}
|
||||
|
||||
func (n *NIC) Down() {
|
||||
func (n *NICIO) Down() {
|
||||
execute("route", "delete", n.subnet.String(), "-interface", n.ifce.Name())
|
||||
for _, c := range n.cidrs {
|
||||
execute("route", "delete", c, "-interface", n.ifce.Name())
|
||||
|
||||
Reference in New Issue
Block a user