]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: vxlan require Remote= to be a non multicast address (#8117)
authorSusant Sahani <145210+ssahani@users.noreply.github.com>
Thu, 8 Feb 2018 09:22:46 +0000 (14:52 +0530)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 8 Feb 2018 09:22:46 +0000 (10:22 +0100)
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
src/network/netdev/vxlan.c

index 2f67d2f2230ac90510bf3b6720ea9a1191379f67..af46360f492f46ec5ea300b4861293976940b11a 100644 (file)
       <varlistentry>
         <term><varname>Remote=</varname></term>
         <listitem>
-          <para>Configures destination multicast group IP address.</para>
+          <para>Configures destination IP address.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
index 580e5e6505895fd25b660c2d698aba8b15bad0a3..ad050efeca6ee56da6897c8b15e3dd0ed5533a7a 100644 (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;