1 Index: linux-2.6.27.y/include/linux/skbuff.h
2 ===================================================================
3 --- linux-2.6.27.y.orig/include/linux/skbuff.h
4 +++ linux-2.6.27.y/include/linux/skbuff.h
5 @@ -330,6 +330,7 @@ struct sk_buff {
13 Index: linux-2.6.27.y/net/core/skbuff.c
14 ===================================================================
15 --- linux-2.6.27.y.orig/net/core/skbuff.c
16 +++ linux-2.6.27.y/net/core/skbuff.c
18 #include <linux/rtnetlink.h>
19 #include <linux/init.h>
20 #include <linux/scatterlist.h>
21 +#include <linux/vs_network.h>
23 #include <net/protocol.h>
25 @@ -197,6 +198,7 @@ struct sk_buff *__alloc_skb(unsigned int
27 skb_reset_tail_pointer(skb);
28 skb->end = skb->tail + size;
29 + if (!in_interrupt()) skb->skb_tag = nx_current_nid(); else skb->skb_tag = 0;
30 /* make sure we initialize shinfo sequentially */
31 shinfo = skb_shinfo(skb);
32 atomic_set(&shinfo->dataref, 1);
33 @@ -448,6 +450,7 @@ static void __copy_skb_header(struct sk_
36 new->vlan_tci = old->vlan_tci;
37 + new->skb_tag = old->skb_tag;
39 skb_copy_secmark(new, old);
41 @@ -478,6 +481,8 @@ static struct sk_buff *__skb_clone(struc
43 atomic_set(&n->users, 1);
45 + /* Sapan: Cloned skbs aren't owned by anyone. Let the cloner decide who it belongs to. */
47 atomic_inc(&(skb_shinfo(skb)->dataref));
50 Index: linux-2.6.27.y/net/core/sock.c
51 ===================================================================
52 --- linux-2.6.27.y.orig/net/core/sock.c
53 +++ linux-2.6.27.y/net/core/sock.c
54 @@ -956,6 +956,8 @@ struct sock *sk_alloc(struct net *net, i
55 sk->sk_prot = sk->sk_prot_creator = prot;
57 sock_net_set(sk, get_net(net));
58 + if (!in_interrupt())
59 + sk->sk_mark = nx_current_nid();
63 Index: linux-2.6.27.y/net/ipv4/af_inet.c
64 ===================================================================
65 --- linux-2.6.27.y.orig/net/ipv4/af_inet.c
66 +++ linux-2.6.27.y/net/ipv4/af_inet.c
67 @@ -181,6 +181,8 @@ static int inet_autobind(struct sock *sk
70 inet->sport = htons(inet->num);
71 + sk->sk_xid = vx_current_xid();
72 + if (!in_interrupt()) sk->sk_nid = nx_current_nid(); else sk->sk_nid=0;
76 Index: linux-2.6.27.y/net/ipv4/netfilter/ipt_LOG.c
77 ===================================================================
78 --- linux-2.6.27.y.orig/net/ipv4/netfilter/ipt_LOG.c
79 +++ linux-2.6.27.y/net/ipv4/netfilter/ipt_LOG.c
80 @@ -45,6 +45,8 @@ static void dump_packet(const struct nf_
82 logflags = NF_LOG_MASK;
84 + printk("TAG=%d ", skb->skb_tag);
86 ih = skb_header_pointer(skb, iphoff, sizeof(_iph), &_iph);