diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd/sd-netlink/netlink-types-rtnl.c | 27 | ||||
-rw-r--r-- | src/network/netdev/geneve.c | 6 | ||||
-rw-r--r-- | src/network/netdev/geneve.h | 2 | ||||
-rw-r--r-- | src/network/netdev/netdev-gperf.gperf | 1 |
4 files changed, 23 insertions, 13 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-types-rtnl.c b/src/libsystemd/sd-netlink/netlink-types-rtnl.c index 919512d110..0153456d9b 100644 --- a/src/libsystemd/sd-netlink/netlink-types-rtnl.c +++ b/src/libsystemd/sd-netlink/netlink-types-rtnl.c @@ -192,19 +192,20 @@ static const NLAPolicy rtnl_link_info_data_can_policies[] = { }; static const NLAPolicy rtnl_link_info_data_geneve_policies[] = { - [IFLA_GENEVE_ID] = BUILD_POLICY(U32), - [IFLA_GENEVE_REMOTE] = BUILD_POLICY_WITH_SIZE(IN_ADDR, sizeof(struct in_addr)), - [IFLA_GENEVE_TTL] = BUILD_POLICY(U8), - [IFLA_GENEVE_TOS] = BUILD_POLICY(U8), - [IFLA_GENEVE_PORT] = BUILD_POLICY(U16), - [IFLA_GENEVE_COLLECT_METADATA] = BUILD_POLICY(FLAG), - [IFLA_GENEVE_REMOTE6] = BUILD_POLICY_WITH_SIZE(IN_ADDR, sizeof(struct in6_addr)), - [IFLA_GENEVE_UDP_CSUM] = BUILD_POLICY(U8), - [IFLA_GENEVE_UDP_ZERO_CSUM6_TX] = BUILD_POLICY(U8), - [IFLA_GENEVE_UDP_ZERO_CSUM6_RX] = BUILD_POLICY(U8), - [IFLA_GENEVE_LABEL] = BUILD_POLICY(U32), - [IFLA_GENEVE_TTL_INHERIT] = BUILD_POLICY(U8), - [IFLA_GENEVE_DF] = BUILD_POLICY(U8), + [IFLA_GENEVE_ID] = BUILD_POLICY(U32), + [IFLA_GENEVE_REMOTE] = BUILD_POLICY_WITH_SIZE(IN_ADDR, sizeof(struct in_addr)), + [IFLA_GENEVE_TTL] = BUILD_POLICY(U8), + [IFLA_GENEVE_TOS] = BUILD_POLICY(U8), + [IFLA_GENEVE_PORT] = BUILD_POLICY(U16), + [IFLA_GENEVE_COLLECT_METADATA] = BUILD_POLICY(FLAG), + [IFLA_GENEVE_REMOTE6] = BUILD_POLICY_WITH_SIZE(IN_ADDR, sizeof(struct in6_addr)), + [IFLA_GENEVE_UDP_CSUM] = BUILD_POLICY(U8), + [IFLA_GENEVE_UDP_ZERO_CSUM6_TX] = BUILD_POLICY(U8), + [IFLA_GENEVE_UDP_ZERO_CSUM6_RX] = BUILD_POLICY(U8), + [IFLA_GENEVE_LABEL] = BUILD_POLICY(U32), + [IFLA_GENEVE_TTL_INHERIT] = BUILD_POLICY(U8), + [IFLA_GENEVE_DF] = BUILD_POLICY(U8), + [IFLA_GENEVE_INNER_PROTO_INHERIT] = BUILD_POLICY(FLAG), }; static const NLAPolicy rtnl_link_info_data_gre_policies[] = { diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c index 777a32d75c..7d5a8679d1 100644 --- a/src/network/netdev/geneve.c +++ b/src/network/netdev/geneve.c @@ -89,6 +89,12 @@ static int netdev_geneve_fill_message_create(NetDev *netdev, Link *link, sd_netl return r; } + if (v->inherit_inner_protocol) { + r = sd_netlink_message_append_flag(m, IFLA_GENEVE_INNER_PROTO_INHERIT); + if (r < 0) + return r; + } + if (v->geneve_df != _NETDEV_GENEVE_DF_INVALID) { r = sd_netlink_message_append_u8(m, IFLA_GENEVE_DF, v->geneve_df); if (r < 0) diff --git a/src/network/netdev/geneve.h b/src/network/netdev/geneve.h index 1f0f15c2ad..3cbf694bba 100644 --- a/src/network/netdev/geneve.h +++ b/src/network/netdev/geneve.h @@ -37,6 +37,8 @@ struct Geneve { GeneveDF geneve_df; union in_addr_union remote; + + bool inherit_inner_protocol; }; DEFINE_NETDEV_CAST(GENEVE, Geneve); diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf index 3cfcd51e63..ade5b1b919 100644 --- a/src/network/netdev/netdev-gperf.gperf +++ b/src/network/netdev/netdev-gperf.gperf @@ -162,6 +162,7 @@ GENEVE.UDP6ZeroChecksumTx, config_parse_bool, GENEVE.DestinationPort, config_parse_ip_port, 0, offsetof(Geneve, dest_port) GENEVE.IPDoNotFragment, config_parse_geneve_df, 0, offsetof(Geneve, geneve_df) GENEVE.FlowLabel, config_parse_geneve_flow_label, 0, 0 +GENEVE.InheritInnerProtocol, config_parse_bool, 0, offsetof(Geneve, inherit_inner_protocol) MACsec.Port, config_parse_macsec_port, 0, 0 MACsec.Encrypt, config_parse_tristate, 0, offsetof(MACsec, encrypt) MACsecReceiveChannel.Port, config_parse_macsec_port, 0, 0 |