From: Ondrej Lichtner <olichtne(a)redhat.com>
When the group paramter is defined for a vxlan based connection the
realdev parameter is also required otherwise the kernel returns a
configuration error.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Devices/VxlanDevice.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lnst/Devices/VxlanDevice.py b/lnst/Devices/VxlanDevice.py
index 183d3e16..f5e0e50f 100644
--- a/lnst/Devices/VxlanDevice.py
+++ b/lnst/Devices/VxlanDevice.py
@@ -31,6 +31,9 @@ def __init__(self, ifmanager, *args, **kwargs):
if "group" not in kwargs and "remote" not in kwargs:
raise DeviceError("One of group or remote must be specified for
vxlan")
+ if "group" in kwargs and "realdev" not in kwargs:
+ raise DeviceError("'group' requires realdev to be
specified")
+
if kwargs.get("remote", False) and
ipaddress(kwargs["remote"]).is_multicast:
logging.debug("ATTENTION: non-unicast remote IP set: %s" %
str(kwargs["remote"]))
--
2.30.1