catch "Link not found" error
This commit is contained in:
parent
23580da495
commit
7a356867c3
@ -131,7 +131,12 @@ func (r *IPSetToLink) insertIPRoute() error {
|
||||
// Find interface
|
||||
iface, err := netlink.LinkByName(r.IfaceName)
|
||||
if err != nil {
|
||||
// TODO: Нормально отлавливать ошибку
|
||||
if err.Error() != "Link not found" {
|
||||
return fmt.Errorf("error while getting interface: %w", err)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// Mapping iface with table
|
||||
|
Loading…
x
Reference in New Issue
Block a user