|
|
@ -93,6 +93,13 @@ func main() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
logger.Info.Printf("Initially setting all current routes")
|
|
|
|
logger.Info.Printf("Initially setting all current routes")
|
|
|
|
|
|
|
|
syncCurrentRoutesToHandler(routeSubChan, routeList)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select {}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func syncCurrentRoutesToHandler(routeSubChan chan netlink.RouteUpdate, routeList []netlink.Route){
|
|
|
|
|
|
|
|
|
|
|
|
for _, route := range routeList {
|
|
|
|
for _, route := range routeList {
|
|
|
|
// Ignore routes with empty gateway
|
|
|
|
// Ignore routes with empty gateway
|
|
|
|
if(route.Gw == nil){
|
|
|
|
if(route.Gw == nil){
|
|
|
@ -105,8 +112,6 @@ func main() {
|
|
|
|
Route: route,
|
|
|
|
Route: route,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
select {}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var routeUpdateTypeMapFromId = map[uint16]string{
|
|
|
|
var routeUpdateTypeMapFromId = map[uint16]string{
|
|
|
|