f-57: subnet: gateway anycast sur macvlan, adresse d'émission sur le bridge, MAC anycast confinée au netns #57

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-13 14:42:01 +02:00
commit 6c35ebdff4
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
7 changed files with 239 additions and 4 deletions

View file

@ -79,7 +79,11 @@ func deleteSubnetVxlan(d subnetData) error {
vxlanIface := fmt.Sprintf("vxlan-%d", d.vxlanID)
vethI := "v-" + d.subnetID + "-i"
if err := netns.Call(d.vpc, func() error {
if d.anycast() {
if err := deleteAnycastGateway(d, vethI); err != nil {
return fmt.Errorf("delete netns resources: %w", err)
}
} else if err := netns.Call(d.vpc, func() error {
if err := ebtables.DeleteARPToGateway(vethI, d.interfaceIP.String()); err != nil {
return fmt.Errorf("delete ebtables arp rule: %w", err)
}