From bf443be99565e4327f1c8c12b79d98b4c1529cf1 Mon Sep 17 00:00:00 2001
From: Susant Sahani <145210+ssahani@users.noreply.github.com>
Date: Thu, 8 Feb 2018 14:52:46 +0530
Subject: [PATCH] networkd: vxlan require Remote= to be a non multicast address
(#8117)
Remote= must be a non multicast address. ip-link(8) says:
> remote IPADDR - specifies the unicast destination IP address to
> use in outgoing packets when the destination link layer address
> is not known in the VXLAN device forwarding database.
Closes #8088.
---
man/systemd.netdev.xml | 2 +-
src/network/netdev/vxlan.c | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml
index 2f67d2f2230..af46360f492 100644
--- a/man/systemd.netdev.xml
+++ b/man/systemd.netdev.xml
@@ -544,7 +544,7 @@
Remote=
- Configures destination multicast group IP address.
+ Configures destination IP address.
diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c
index 580e5e65058..ad050efeca6 100644
--- a/src/network/netdev/vxlan.c
+++ b/src/network/netdev/vxlan.c
@@ -198,7 +198,7 @@ int config_parse_vxlan_address(const char *unit,
r = in_addr_is_multicast(f, &buffer);
- if (STR_IN_SET(lvalue, "Group", "Remote")) {
+ if (streq(lvalue, "Group")) {
if (r <= 0) {
log_syntax(unit, LOG_ERR, filename, line, 0, "vxlan invalid multicast '%s' address, ignoring assignment: %s", lvalue, rvalue);
return 0;
@@ -211,7 +211,10 @@ int config_parse_vxlan_address(const char *unit,
return 0;
}
- v->local_family = f;
+ if (streq(lvalue, "Remote"))
+ v->remote_family = f;
+ else
+ v->local_family = f;
}
*addr = buffer;