Remove IP address only when Radv is configured

This commit is contained in:
George
2021-07-31 18:07:34 +03:00
parent 35020b0391
commit af290322d1
+5 -2
View File
@@ -198,9 +198,12 @@ func (s *RAdv) Stop() error {
s.conn.Close()
}
if err := s.removeGatewayIP(); err != nil {
s.log.Errorln(err)
if s.config.Enable && s.config.SetGatewayIP {
if err := s.removeGatewayIP(); err != nil {
s.log.Errorln(err)
}
}
return nil
}