Skip to content

Commit

Permalink
sit tunnels: propagate IPv6 transport class to IPv4 Type of Service
Browse files Browse the repository at this point in the history
sit tunnels (IPv6 tunnel over IPv4) do not implement the "tos inherit"
case to copy the IPv6 transport class byte from the inner packet to
the IPv4 type of service byte in the outer packet. By contrast, ipip
tunnels and GRE tunnels do.

This patch, adapted from the similar code in net/ipv4/ipip.c and
net/ipv4/ip_gre.c, implements that.

This patch applies to 3.0.1, and has been tested on that version.

Signed-off-by: Lionel Elie Mamane <lionel@mamane.lu>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Lionel Elie Mamane authored and David S. Miller committed Aug 16, 2011
1 parent 588dc91 commit c2bceb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
if (skb->protocol != htons(ETH_P_IPV6))
goto tx_error;

if (tos == 1)
tos = ipv6_get_dsfield(iph6);

/* ISATAP (RFC4214) - must come before 6to4 */
if (dev->priv_flags & IFF_ISATAP) {
struct neighbour *neigh = NULL;
Expand Down

0 comments on commit c2bceb3

Please sign in to comment.