mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 18:55:40 +03:00
network: Allow vxlan to be created without .network file
This commit is contained in:
parent
e834509760
commit
a9b8450bd4
@ -819,6 +819,13 @@
|
||||
<para>Accepts the same key in [VXLAN] section.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>Independent=</varname></term>
|
||||
<listitem>
|
||||
<para>Takes a boolean. When true, the vxlan interface is created without underlying interfaces.
|
||||
Defaults to <literal>false</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
@ -134,6 +134,7 @@ VXLAN.PortRange, config_parse_port_range,
|
||||
VXLAN.DestinationPort, config_parse_ip_port, 0, offsetof(VxLan, dest_port)
|
||||
VXLAN.FlowLabel, config_parse_flow_label, 0, 0
|
||||
VXLAN.IPDoNotFragment, config_parse_df, 0, offsetof(VxLan, df)
|
||||
VXLAN.Independent, config_parse_bool, 0, offsetof(VxLan, independent)
|
||||
GENEVE.Id, config_parse_geneve_vni, 0, offsetof(Geneve, id)
|
||||
GENEVE.Remote, config_parse_geneve_address, 0, offsetof(Geneve, remote)
|
||||
GENEVE.TOS, config_parse_uint8, 0, offsetof(Geneve, tos)
|
||||
|
@ -823,6 +823,9 @@ int netdev_load_one(Manager *manager, const char *filename) {
|
||||
case NETDEV_KIND_XFRM:
|
||||
independent = XFRM(netdev)->independent;
|
||||
break;
|
||||
case NETDEV_KIND_VXLAN:
|
||||
independent = VXLAN(netdev)->independent;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ static int netdev_vxlan_fill_message_create(NetDev *netdev, Link *link, sd_netli
|
||||
int r;
|
||||
|
||||
assert(netdev);
|
||||
assert(link);
|
||||
assert(m);
|
||||
|
||||
v = VXLAN(netdev);
|
||||
@ -63,7 +62,7 @@ static int netdev_vxlan_fill_message_create(NetDev *netdev, Link *link, sd_netli
|
||||
return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_LOCAL attribute: %m");
|
||||
}
|
||||
|
||||
r = sd_netlink_message_append_u32(m, IFLA_VXLAN_LINK, link->ifindex);
|
||||
r = sd_netlink_message_append_u32(m, IFLA_VXLAN_LINK, link ? link->ifindex : 0);
|
||||
if (r < 0)
|
||||
return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_LINK attribute: %m");
|
||||
|
||||
|
@ -56,6 +56,7 @@ struct VxLan {
|
||||
bool group_policy;
|
||||
bool generic_protocol_extension;
|
||||
bool inherit;
|
||||
bool independent;
|
||||
|
||||
struct ifla_vxlan_port_range port_range;
|
||||
};
|
||||
|
@ -116,6 +116,7 @@ PortRange=
|
||||
UDPChecksum=
|
||||
UDP6ZeroCheckSumTx=
|
||||
IPDoNotFragment=
|
||||
Independent=
|
||||
[VXCAN]
|
||||
Peer=
|
||||
[Bond]
|
||||
|
Loading…
Reference in New Issue
Block a user