mirror of
https://github.com/systemd/systemd.git
synced 2025-03-21 02:50:18 +03:00
networkd: ip6 tunnel add DSCP
This patch adds support for setting the DSCP field in the ip6 tunnel. when set it inherits DSCP field between inner and outer header.
This commit is contained in:
parent
276de52699
commit
ec2a3e3af2
@ -37,6 +37,7 @@ Tunnel.TTL, config_parse_unsigned, 0,
|
||||
Tunnel.DiscoverPathMTU, config_parse_bool, 0, offsetof(Tunnel, pmtudisc)
|
||||
Tunnel.Mode, config_parse_ip6tnl_mode, 0, offsetof(Tunnel, ip6tnl_mode)
|
||||
Tunnel.IPv6FlowLabel, config_parse_ipv6_flowlabel, 0, offsetof(Tunnel, ipv6_flowlabel)
|
||||
Tunnel.DiffServiceCodePoint, config_parse_bool, 0, offsetof(Tunnel, dscp)
|
||||
Peer.Name, config_parse_ifname, 0, offsetof(Veth, ifname_peer)
|
||||
Peer.MACAddress, config_parse_hwaddr, 0, offsetof(Veth, mac_peer)
|
||||
VXLAN.Id, config_parse_uint64, 0, offsetof(VxLan, id)
|
||||
|
@ -271,6 +271,9 @@ static int netdev_ip6tnl_fill_message_create(NetDev *netdev, Link *link, sd_netl
|
||||
return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_FLOWINFO attribute: %m");
|
||||
}
|
||||
|
||||
if (t->dscp)
|
||||
t->flags |= IP6_TNL_F_RCV_DSCP_COPY;
|
||||
|
||||
r = sd_netlink_message_append_u32(m, IFLA_IPTUN_FLAGS, t->flags);
|
||||
if (r < 0)
|
||||
return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_FLAGS attribute: %m");
|
||||
|
@ -57,6 +57,7 @@ struct Tunnel {
|
||||
IPv6FlowLabel ipv6_flowlabel;
|
||||
|
||||
bool pmtudisc;
|
||||
bool dscp;
|
||||
};
|
||||
|
||||
extern const NetDevVTable ipip_vtable;
|
||||
|
Loading…
x
Reference in New Issue
Block a user