e2etest: enable udp_l3mdev_accept on the nodes
The option allows the bfd daemon to listen for udp packets coming from
vrfs different from the default one.
@@ -224,6 +224,12 @@ func vrfSetup(cs *clientset.Clientset) error {
if err != nil {
return err
}
+ // this is required to allow frr to listen for udp connections
+ // in vrfs, in particular to allow bfd to work
+ err = enableL3masterDomains(pod.Spec.NodeName)
+ if err != nil {
+ return err
+ }
}
return nil
}
@@ -542,6 +548,16 @@ func addContainerToNetwork(containerName, network string) error {
return nil
}
+func enableL3masterDomains(container string) error {
+ nodeExec := executor.ForContainer(container)
+ _, err := nodeExec.Exec("sysctl", "net.ipv4.udp_l3mdev_accept=1")
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
func removeContainerFromNetwork(containerName, network string) error {
networks, err := container.Networks(containerName)
if err != nil {
