network: l2tp: change create type to independent

L2TP tunnel does not have underlying interface. Let's change its type to
independent.
This commit is contained in:
Yu Watanabe 2022-02-25 13:56:49 +09:00
parent 8b49ee2dcd
commit 0c91c7a241
5 changed files with 5 additions and 8 deletions

View File

@ -869,7 +869,6 @@ Table=1234</programlisting></para>
<term><varname>IPoIB=</varname></term>
<term><varname>IPVLAN=</varname></term>
<term><varname>IPVTAP=</varname></term>
<term><varname>L2TP=</varname></term>
<term><varname>MACsec=</varname></term>
<term><varname>MACVLAN=</varname></term>
<term><varname>MACVTAP=</varname></term>
@ -878,7 +877,7 @@ Table=1234</programlisting></para>
<term><varname>VXLAN=</varname></term>
<term><varname>Xfrm=</varname></term>
<listitem>
<para>The name of an IPoIB, IPVLAN, IPVTAP, L2TP, MACsec, MACVLAN, MACVTAP, tunnel, VLAN,
<para>The name of an IPoIB, IPVLAN, IPVTAP, MACsec, MACVLAN, MACVTAP, tunnel, VLAN,
VXLAN, or Xfrm to be created on the link. See
<citerefentry><refentrytitle>systemd.netdev</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
This option may be specified more than once.</para>

View File

@ -432,7 +432,7 @@ static int l2tp_create_tunnel_handler(sd_netlink *rtnl, sd_netlink_message *m, N
return 1;
}
static int l2tp_create_tunnel(NetDev *netdev, Link *link) {
static int l2tp_create_tunnel(NetDev *netdev) {
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *m = NULL;
union in_addr_union local_address;
L2tpTunnel *t;
@ -854,9 +854,9 @@ const NetDevVTable l2tptnl_vtable = {
.object_size = sizeof(L2tpTunnel),
.init = l2tp_tunnel_init,
.sections = NETDEV_COMMON_SECTIONS "L2TP\0L2TPSession\0",
.create_after_configured = l2tp_create_tunnel,
.create = l2tp_create_tunnel,
.done = l2tp_tunnel_done,
.create_type = NETDEV_CREATE_AFTER_CONFIGURED,
.create_type = NETDEV_CREATE_INDEPENDENT,
.is_ready_to_create = netdev_l2tp_is_ready_to_create,
.config_verify = netdev_l2tp_tunnel_verify,
};

View File

@ -93,7 +93,7 @@ Network.VRF, config_parse_ifname,
Network.IPoIB, config_parse_stacked_netdev, NETDEV_KIND_IPOIB, offsetof(Network, stacked_netdev_names)
Network.IPVLAN, config_parse_stacked_netdev, NETDEV_KIND_IPVLAN, offsetof(Network, stacked_netdev_names)
Network.IPVTAP, config_parse_stacked_netdev, NETDEV_KIND_IPVTAP, offsetof(Network, stacked_netdev_names)
Network.L2TP, config_parse_stacked_netdev, NETDEV_KIND_L2TP, offsetof(Network, stacked_netdev_names)
Network.L2TP, config_parse_warn_compat, DISABLED_LEGACY, 0
Network.MACsec, config_parse_stacked_netdev, NETDEV_KIND_MACSEC, offsetof(Network, stacked_netdev_names)
Network.MACVLAN, config_parse_stacked_netdev, NETDEV_KIND_MACVLAN, offsetof(Network, stacked_netdev_names)
Network.MACVTAP, config_parse_stacked_netdev, NETDEV_KIND_MACVTAP, offsetof(Network, stacked_netdev_names)

View File

@ -871,7 +871,6 @@ int config_parse_stacked_netdev(
NETDEV_KIND_IPOIB,
NETDEV_KIND_IPVLAN,
NETDEV_KIND_IPVTAP,
NETDEV_KIND_L2TP,
NETDEV_KIND_MACSEC,
NETDEV_KIND_MACVLAN,
NETDEV_KIND_MACVTAP,

View File

@ -5,4 +5,3 @@ Name=test1
[Network]
Address=192.168.30.100/24
IPv6AcceptRA=false
L2TP=l2tp99