summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/systemd.network.xml11
-rw-r--r--src/network/networkd-link.c7
-rw-r--r--src/network/networkd-network-gperf.gperf1
-rw-r--r--src/network/networkd-network.c1
-rw-r--r--src/network/networkd-network.h1
5 files changed, 18 insertions, 3 deletions
diff --git a/man/systemd.network.xml b/man/systemd.network.xml
index 64b9232689..953bc74cc5 100644
--- a/man/systemd.network.xml
+++ b/man/systemd.network.xml
@@ -234,7 +234,7 @@
<varlistentry>
<term><varname>ARP=</varname></term>
<listitem>
- <para> A boolean. Enables or disables the ARP (low-level Address Resolution Protocol)
+ <para>A boolean. Enables or disables the ARP (low-level Address Resolution Protocol)
for this interface. Defaults to unset, which means that the kernel default will be used.</para>
<para> For example, disabling ARP is useful when creating multiple MACVLAN or VLAN virtual
interfaces atop a single lower-level physical interface, which will then only serve as a
@@ -245,7 +245,14 @@
<varlistentry>
<term><varname>Multicast=</varname></term>
<listitem>
- <para> A boolean. Enables or disables the change the MULTICAST flag on the device.</para>
+ <para>A boolean. Enables or disables the multicast flag on the device.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>AllMulticast=</varname></term>
+ <listitem>
+ <para>A boolean. When this flag is set the driver retrieves all multicast packets from the network.
+ This happens when multicast routing is enabled.</para>
</listitem>
</varlistentry>
<varlistentry>
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 32bcc4c459..c957efd409 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1357,7 +1357,7 @@ static int link_set_flags(Link *link) {
if (!link->network)
return 0;
- if (link->network->arp < 0 && link->network->multicast < 0)
+ if (link->network->arp < 0 && link->network->multicast < 0 && link->network->allmulticast < 0)
return 0;
r = sd_rtnl_message_new_link(link->manager->rtnl, &req, RTM_SETLINK, link->ifindex);
@@ -1374,6 +1374,11 @@ static int link_set_flags(Link *link) {
SET_FLAG(ifi_flags, IFF_MULTICAST, link->network->multicast);
}
+ if (link->network->allmulticast >= 0) {
+ ifi_change |= IFF_ALLMULTI;
+ SET_FLAG(ifi_flags, IFF_ALLMULTI, link->network->allmulticast);
+ }
+
r = sd_rtnl_message_link_set_flags(req, ifi_flags, ifi_change);
if (r < 0)
return log_link_error_errno(link, r, "Could not set link flags: %m");
diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
index 26e3f452ef..7e625e48fa 100644
--- a/src/network/networkd-network-gperf.gperf
+++ b/src/network/networkd-network-gperf.gperf
@@ -34,6 +34,7 @@ Link.MACAddress, config_parse_hwaddr,
Link.MTUBytes, config_parse_mtu, AF_UNSPEC, offsetof(Network, mtu)
Link.ARP, config_parse_tristate, 0, offsetof(Network, arp)
Link.Multicast, config_parse_tristate, 0, offsetof(Network, multicast)
+Link.AllMulticast, config_parse_tristate, 0, offsetof(Network, allmulticast)
Link.Unmanaged, config_parse_bool, 0, offsetof(Network, unmanaged)
Link.RequiredForOnline, config_parse_bool, 0, offsetof(Network, required_for_online)
Network.Description, config_parse_string, 0, offsetof(Network, description)
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 57d04827ab..c3a11ddca0 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -248,6 +248,7 @@ static int network_load_one(Manager *manager, const char *filename) {
network->proxy_arp = -1;
network->arp = -1;
network->multicast = -1;
+ network->allmulticast = -1;
network->ipv6_accept_ra_use_dns = true;
network->ipv6_accept_ra_route_table = RT_TABLE_MAIN;
network->ipv6_mtu = 0;
diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h
index 86e97909c9..b8e2c523a3 100644
--- a/src/network/networkd-network.h
+++ b/src/network/networkd-network.h
@@ -214,6 +214,7 @@ struct Network {
uint32_t mtu;
int arp;
int multicast;
+ int allmulticast;
bool unmanaged;
bool configure_without_carrier;
uint32_t iaid;