• Peter Dawson's avatar
    ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets · 0e9a7095
    Peter Dawson authored
    This fix addresses two problems in the way the DSCP field is formulated
     on the encapsulating header of IPv6 tunnels.
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195661
    
    1) The IPv6 tunneling code was manipulating the DSCP field of the
     encapsulating packet using the 32b flowlabel. Since the flowlabel is
     only the lower 20b it was incorrect to assume that the upper 12b
     containing the DSCP and ECN fields would remain intact when formulating
     the encapsulating header. This fix handles the 'inherit' and
     'fixed-value' DSCP cases explicitly using the extant dsfield u8 variable.
    
    2) The use of INET_ECN_encapsulate(0, dsfield) in ip6_tnl_xmit was
     incorrect and resulted in the DSCP value always being set to 0.
    
    Commit 90427ef5 ("ipv6: fix flow labels when the traffic class
     is non-0") caused the regression by masking out the flowlabel
     which exposed the incorrect handling of the DSCP portion of the
     flowlabel in ip6_tunnel and ip6_gre.
    
    Fixes: 90427ef5 ("ipv6: fix flow labels when the traffic class is non-0")
    Signed-off-by: 's avatarPeter Dawson <peter.a.dawson@boeing.com>
    Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
    0e9a7095
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...