Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipvs: Maintain all DSCP and ECN bits for ipv6 tun forwarding

Previously, only the four high bits of the tclass were maintained in the
ipv6 case. This matches the behavior of ipv4, though whether or not we
should reflect ECN bits may be up for debate.

Signed-off-by: Alex Gartrell <agartrell@fb.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>

authored by

Alex Gartrell and committed by
Simon Horman
76f084bc 2627b7e1

+1 -1
+1 -1
net/netfilter/ipvs/ip_vs_xmit.c
··· 967 967 iph->nexthdr = IPPROTO_IPV6; 968 968 iph->payload_len = old_iph->payload_len; 969 969 be16_add_cpu(&iph->payload_len, sizeof(*old_iph)); 970 - iph->priority = old_iph->priority; 971 970 memset(&iph->flow_lbl, 0, sizeof(iph->flow_lbl)); 971 + ipv6_change_dsfield(iph, 0, ipv6_get_dsfield(old_iph)); 972 972 iph->daddr = cp->daddr.in6; 973 973 iph->saddr = saddr; 974 974 iph->hop_limit = old_iph->hop_limit;