Don't re-apply routes on BSD

See issue #1986
This commit is contained in:
travis laduke 2023-05-03 14:22:40 -07:00 committed by Travis LaDuke
parent 9b7ff43118
commit e2dad367b4

View File

@ -509,13 +509,13 @@ bool ManagedRoute::sync()
}
}
//if (!_applied.count(leftt)) {
if (leftt && !_applied.count(leftt)) {
_applied[leftt] = !_via;
//_routeCmd("delete",leftt,_via,(const char *)0,(_via) ? (const char *)0 : _device);
_routeCmd("add",leftt,_via,(const char *)0,(_via) ? (const char *)0 : _device);
//_routeCmd("change",leftt,_via,(const char *)0,(_via) ? (const char *)0 : _device);
//}
if (rightt) {
}
if (rightt && !_applied.count(rightt)) {
_applied[rightt] = !_via;
//_routeCmd("delete",rightt,_via,(const char *)0,(_via) ? (const char *)0 : _device);
_routeCmd("add",rightt,_via,(const char *)0,(_via) ? (const char *)0 : _device);