X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=linux-2.6-521-packet-tagging.patch;h=a59ef8b63b95f00d17f694f32a5c9d10bb0f004d;hb=refs%2Fheads%2F27;hp=5fcc1cffd58440858b37bd91d1e60c35d0d395a2;hpb=15a27320917fe4100c0204359a6a9d18349fb31d;p=linux-2.6.git diff --git a/linux-2.6-521-packet-tagging.patch b/linux-2.6-521-packet-tagging.patch index 5fcc1cffd..a59ef8b63 100644 --- a/linux-2.6-521-packet-tagging.patch +++ b/linux-2.6-521-packet-tagging.patch @@ -1,18 +1,20 @@ -diff -Nurb linux-2.6.22-510/include/linux/skbuff.h linux-2.6.22-520/include/linux/skbuff.h ---- linux-2.6.22-510/include/linux/skbuff.h 2007-07-08 19:32:17.000000000 -0400 -+++ linux-2.6.22-520/include/linux/skbuff.h 2008-06-06 17:07:56.000000000 -0400 -@@ -302,6 +302,7 @@ +Index: linux-2.6.27.y/include/linux/skbuff.h +=================================================================== +--- linux-2.6.27.y.orig/include/linux/skbuff.h ++++ linux-2.6.27.y/include/linux/skbuff.h +@@ -330,6 +330,7 @@ struct sk_buff { #endif __u32 mark; +#define skb_tag mark - sk_buff_data_t transport_header; - sk_buff_data_t network_header; -diff -Nurb linux-2.6.22-510/net/core/skbuff.c linux-2.6.22-520/net/core/skbuff.c ---- linux-2.6.22-510/net/core/skbuff.c 2007-07-08 19:32:17.000000000 -0400 -+++ linux-2.6.22-520/net/core/skbuff.c 2008-06-06 17:07:56.000000000 -0400 -@@ -56,6 +56,7 @@ + __u16 vlan_tci; + +Index: linux-2.6.27.y/net/core/skbuff.c +=================================================================== +--- linux-2.6.27.y.orig/net/core/skbuff.c ++++ linux-2.6.27.y/net/core/skbuff.c +@@ -55,6 +55,7 @@ #include #include #include @@ -20,7 +22,7 @@ diff -Nurb linux-2.6.22-510/net/core/skbuff.c linux-2.6.22-520/net/core/skbuff.c #include #include -@@ -174,6 +175,7 @@ +@@ -197,6 +198,7 @@ struct sk_buff *__alloc_skb(unsigned int skb->data = data; skb_reset_tail_pointer(skb); skb->end = skb->tail + size; @@ -28,27 +30,41 @@ diff -Nurb linux-2.6.22-510/net/core/skbuff.c linux-2.6.22-520/net/core/skbuff.c /* make sure we initialize shinfo sequentially */ shinfo = skb_shinfo(skb); atomic_set(&shinfo->dataref, 1); -@@ -443,6 +445,8 @@ - C(tail); - C(end); +@@ -448,6 +450,7 @@ static void __copy_skb_header(struct sk_ + #endif + #endif + new->vlan_tci = old->vlan_tci; ++ new->skb_tag = old->skb_tag; + + skb_copy_secmark(new, old); + } +@@ -478,6 +481,8 @@ static struct sk_buff *__skb_clone(struc + #endif + atomic_set(&n->users, 1); + /* Sapan: Cloned skbs aren't owned by anyone. Let the cloner decide who it belongs to. */ + atomic_inc(&(skb_shinfo(skb)->dataref)); skb->cloned = 1; -@@ -492,6 +496,7 @@ - new->tc_index = old->tc_index; - #endif - skb_copy_secmark(new, old); -+ new->skb_tag = old->skb_tag; - atomic_set(&new->users, 1); - skb_shinfo(new)->gso_size = skb_shinfo(old)->gso_size; - skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs; -diff -Nurb linux-2.6.22-510/net/ipv4/af_inet.c linux-2.6.22-520/net/ipv4/af_inet.c ---- linux-2.6.22-510/net/ipv4/af_inet.c 2008-06-06 17:07:48.000000000 -0400 -+++ linux-2.6.22-520/net/ipv4/af_inet.c 2008-06-06 17:07:56.000000000 -0400 -@@ -178,6 +178,8 @@ +Index: linux-2.6.27.y/net/core/sock.c +=================================================================== +--- linux-2.6.27.y.orig/net/core/sock.c ++++ linux-2.6.27.y/net/core/sock.c +@@ -956,6 +956,8 @@ struct sock *sk_alloc(struct net *net, i + sk->sk_prot = sk->sk_prot_creator = prot; + sock_lock_init(sk); + sock_net_set(sk, get_net(net)); ++ if (!in_interrupt()) ++ sk->sk_mark = nx_current_nid(); + } + + return sk; +Index: linux-2.6.27.y/net/ipv4/af_inet.c +=================================================================== +--- linux-2.6.27.y.orig/net/ipv4/af_inet.c ++++ linux-2.6.27.y/net/ipv4/af_inet.c +@@ -181,6 +181,8 @@ static int inet_autobind(struct sock *sk return -EAGAIN; } inet->sport = htons(inet->num); @@ -57,10 +73,11 @@ diff -Nurb linux-2.6.22-510/net/ipv4/af_inet.c linux-2.6.22-520/net/ipv4/af_inet } release_sock(sk); return 0; -diff -Nurb linux-2.6.22-510/net/ipv4/netfilter/ipt_LOG.c linux-2.6.22-520/net/ipv4/netfilter/ipt_LOG.c ---- linux-2.6.22-510/net/ipv4/netfilter/ipt_LOG.c 2008-06-06 17:07:43.000000000 -0400 -+++ linux-2.6.22-520/net/ipv4/netfilter/ipt_LOG.c 2008-06-06 17:07:56.000000000 -0400 -@@ -49,6 +49,8 @@ +Index: linux-2.6.27.y/net/ipv4/netfilter/ipt_LOG.c +=================================================================== +--- linux-2.6.27.y.orig/net/ipv4/netfilter/ipt_LOG.c ++++ linux-2.6.27.y/net/ipv4/netfilter/ipt_LOG.c +@@ -45,6 +45,8 @@ static void dump_packet(const struct nf_ else logflags = NF_LOG_MASK; @@ -69,4 +86,3 @@ diff -Nurb linux-2.6.22-510/net/ipv4/netfilter/ipt_LOG.c linux-2.6.22-520/net/ip ih = skb_header_pointer(skb, iphoff, sizeof(_iph), &_iph); if (ih == NULL) { printk("TRUNCATED"); -