Skip to contentSkip to conversation

[[email protected]: RFC: promote netfilter MARK value from IPv6 packets to sit packets]

RFC New Harald Welte 1 participant 1 message Feb 23, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

RFC 1/1 [[email protected]: RFC: promote netfilter MARK value from IPv6 packets to sit packets]

just in case somebody is interested...

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

Hi,

I'm new to the list, so be gentle with your flames ;-)

On my outgoing connection to the internet I provide QoS using ratelimiting and prioritizing packets. However, it's a cablemodem and my provider only speaks IPv4. Over the connections I run multiple IPv6 tunnels, and I want to provide QoS on these tunnels too.

QoS however can only be provided on the physical outgoing interface. On that level, I can only see IPv4 packets and therefore it's impossible to provide QoS on IPv6 for me.

In order to be able to provide QoS on tunneled IPv6 connections, I've created a simple patch (definately not ready for inclusion in the kernel, since it surely needs a configuration option) which promotes the netfilter MARK value from the IPv6 packets to the sit packets.
Now I can mark packets using ip6tables, and on the ipv4 level I can still differentiate between the priorities. Problem solved, I'm happy ;-)

Below is the patch, created on Linux 2.4.19:

ipv6/sit.c renamed from ipv6/sit.c.orig +3 -0
@@ -571,6 +571,9 @@
 		}
 		if (skb->sk)
 			skb_set_owner_w(new_skb, skb->sk);
+#ifdef CONFIG_NETFILTER
+		new_skb->nfmark = skb->nfmark;
+#endif
 		dev_kfree_skb(skb);
 		skb = new_skb;
 	}
Signature · 1 line
Erik Hensema ([email protected])