1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-26 14:04:03 +03:00

Merge pull request #19704 from yuwata/network-small-fixes

network: several tiny cleanups
This commit is contained in:
Yu Watanabe 2021-05-23 23:02:07 +09:00 committed by GitHub
commit 113d94c393
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 7 deletions

View File

@ -422,11 +422,15 @@
<varlistentry>
<term><varname>IPv6LinkLocalAddressGenerationMode=</varname></term>
<listitem>
<para>Specifies how IPv6 link local address is generated. Takes one of <literal>eui64</literal>,
<literal>none</literal>, <literal>stable-privacy</literal> and <literal>random</literal>.
When unset, the kernel's default will be used. Note that if <varname>LinkLocalAddressing=</varname>
not configured as <literal>ipv6</literal> then <varname>IPv6LinkLocalAddressGenerationMode=</varname>
is ignored.</para>
<para>Specifies how IPv6 link local address is generated. Takes one of
<literal>eui64</literal>, <literal>none</literal>, <literal>stable-privacy</literal> and
<literal>random</literal>. When unset, the kernel's default will be used. Note that if
<varname>LinkLocalAddressing=</varname> is <literal>no</literal> or
<literal>ipv4</literal>, then <varname>IPv6LinkLocalAddressGenerationMode=</varname> will
be ignored. Also, even if <varname>LinkLocalAddressing=</varname> is <literal>yes</literal>
or <literal>ipv6</literal>, setting
<varname>IPv6LinkLocalAddressGenerationMode=none</varname> disables to configure an IPv6
link-local address.</para>
</listitem>
</varlistentry>
<varlistentry>

View File

@ -34,6 +34,10 @@ static inline int ordered_set_put(OrderedSet *s, void *p) {
return ordered_hashmap_put((OrderedHashmap*) s, p, p);
}
static inline void *ordered_set_get(OrderedSet *s, const void *p) {
return ordered_hashmap_get((OrderedHashmap*) s, p);
}
static inline unsigned ordered_set_size(OrderedSet *s) {
return ordered_hashmap_size((OrderedHashmap*) s);
}

View File

@ -2067,7 +2067,7 @@ static int link_drop_config(Link *link) {
return r;
}
int link_configure(Link *link) {
static int link_configure(Link *link) {
int r;
assert(link);

View File

@ -241,7 +241,6 @@ int link_stop_engines(Link *link, bool may_keep_dhcp);
const char* link_state_to_string(LinkState s) _const_;
LinkState link_state_from_string(const char *s) _pure_;
int link_configure(Link *link);
int link_reconfigure(Link *link, bool force);
int manager_udev_process_link(sd_device_monitor *monitor, sd_device *device, void *userdata);

View File

@ -170,6 +170,8 @@ int network_verify(Network *network) {
if (network->link_local < 0)
network->link_local = network->bridge ? ADDRESS_FAMILY_NO : ADDRESS_FAMILY_IPV6;
if (network->ipv6ll_address_gen_mode == IPV6_LINK_LOCAL_ADDRESSS_GEN_MODE_NONE)
SET_FLAG(network->link_local, ADDRESS_FAMILY_IPV6, false);
/* IPMasquerade implies IPForward */
network->ip_forward |= network->ip_masquerade;