mirror of
https://github.com/soypat/lneto.git
synced 2026-08-18 21:54:01 +00:00
do not crash if no tcp connections are desired
This commit is contained in:
@@ -41,7 +41,7 @@ func (ls *StackEthernet) Reset6(mac, gateway [6]byte, mtu, maxNodes int) error {
|
||||
if mtu > math.MaxUint16 || mtu < 256 {
|
||||
return errors.New("invalid MTU")
|
||||
} else if maxNodes <= 0 {
|
||||
return errZeroMaxNodes
|
||||
return errZeroMaxNodesArg
|
||||
}
|
||||
ls.handlers = slices.Grow(ls.handlers[:0], maxNodes)
|
||||
*ls = StackEthernet{
|
||||
|
||||
Reference in New Issue
Block a user