netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sit tunnels: propagate IPv6 transport class to IPv4 Type of Service
@ 2011-08-14  0:04 Lionel Elie Mamane
  2011-08-16 23:30 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Lionel Elie Mamane @ 2011-08-14  0:04 UTC (permalink / raw)
  To: Pekka Savola (ipv6), Hideaki YOSHIFUJI
  Cc: Alexey Kuznetsov, David S. Miller, James Morris, Patrick McHardy,
	netdev, linux-kernel

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>

---
 net/ipv6/sit.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 1cca576..bbe2468 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -672,6 +672,10 @@ 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;
-- 
Lionel Mamane

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sit tunnels: propagate IPv6 transport class to IPv4 Type of Service
  2011-08-14  0:04 [PATCH] sit tunnels: propagate IPv6 transport class to IPv4 Type of Service Lionel Elie Mamane
@ 2011-08-16 23:30 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-08-16 23:30 UTC (permalink / raw)
  To: lionel; +Cc: pekkas, yoshfuji, kuznet, jmorris, kaber, netdev, linux-kernel

From: Lionel Elie Mamane <lionel@mamane.lu>
Date: Sun, 14 Aug 2011 02:04:38 +0200

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-16 23:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-14  0:04 [PATCH] sit tunnels: propagate IPv6 transport class to IPv4 Type of Service Lionel Elie Mamane
2011-08-16 23:30 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).