mirror of
https://github.com/soypat/lneto.git
synced 2026-08-21 15:09:05 +00:00
add zero max ports error
This commit is contained in:
@@ -27,6 +27,9 @@ type StackIP struct {
|
||||
}
|
||||
|
||||
func (sb *StackIP) Reset(addr netip.Addr, maxNodes int) error {
|
||||
if maxNodes <= 0 {
|
||||
return errZeroMaxNodes
|
||||
}
|
||||
err := sb.SetAddr(addr)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user