f-41: vm: /32 de chaque interface annoncé dans la VRF #41

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-11 20:32:16 +02:00
commit 03029eabe8
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
5 changed files with 125 additions and 0 deletions

View file

@ -15,6 +15,7 @@ import (
"git.g3e.fr/syonad/two/internal/netns"
"git.g3e.fr/syonad/two/internal/qemu"
"git.g3e.fr/syonad/two/internal/state"
"git.g3e.fr/syonad/two/internal/vpc"
"github.com/dgraph-io/badger/v4"
)
@ -111,6 +112,10 @@ func StartVM(db *badger.DB, name string, cfg *configuration.Config) error {
return fmt.Errorf("start qemu: %w", err)
}
if err := applyHostRoutes(db, d, vpc.ExportRoute); err != nil {
return err
}
return state.Set(db, "vm/"+name, state.Running)
}