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.
This commit is contained in:
Susant Sahani 2018-02-08 14:52:46 +05:30 committed by Zbigniew Jędrzejewski-Szmek
parent ed10715af2
commit bf443be995
2 changed files with 6 additions and 3 deletions

View file

@ -544,7 +544,7 @@
<varlistentry>
<term><varname>Remote=</varname></term>
<listitem>
<para>Configures destination multicast group IP address.</para>
<para>Configures destination IP address.</para>
</listitem>
</varlistentry>
<varlistentry>

View file

@ -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;