diff -Ndur linux-2.6.32-700/fs/proc/web100.c linux-2.6.32-700-xidmask/fs/proc/web100.c
--- linux-2.6.32-700/fs/proc/web100.c 2013-01-10 14:18:50.429337747 -0500
-+++ linux-2.6.32-700-xidmask/fs/proc/web100.c 2013-01-19 23:39:00.433628214 -0500
++++ linux-2.6.32-700-xidmask/fs/proc/web100.c 2013-02-06 17:36:52.308961450 -0500
+@@ -427,10 +427,10 @@
+ local_port = vars->LocalPort;
+ remote_port = vars->RemPort;
+
+- len += v6addr_str(tmpbuf + len, (short *)&vars->LocalAddress.v6addr.addr);
+- len += sprintf(tmpbuf + len, ".%d ", local_port);
+- len += v6addr_str(tmpbuf + len, (short *)&vars->RemAddress.v6addr.addr);
+- len += sprintf(tmpbuf + len, ".%d\n", remote_port);
++ len += snprintf(tmpbuf + len, sizeof(tmpbuf) - len, "%pI6", &vars->LocalAddress.v6addr.addr);
++ len += snprintf(tmpbuf + len, sizeof(tmpbuf) - len, ".%d ", local_port);
++ len += snprintf(tmpbuf + len, sizeof(tmpbuf) - len, "%pI6", &vars->RemAddress.v6addr.addr);
++ len += snprintf(tmpbuf + len, sizeof(tmpbuf) - len, ".%d\n", remote_port);
+ } else {
+ printk(KERN_ERR "connection_spec_ascii_read: LocalAddressType invalid\n");
+ return 0;
@@ -655,7 +655,8 @@
stats = web100stats_first;
/* For the TCP code */
extern int web100_stats_create(struct sock *sk);
-diff -Ndur linux-2.6.32-700/Makefile linux-2.6.32-700-xidmask/Makefile
---- linux-2.6.32-700/Makefile 2013-01-10 14:18:52.816337505 -0500
-+++ linux-2.6.32-700-xidmask/Makefile 2013-01-19 18:08:11.786396982 -0500
-@@ -1,7 +1,7 @@
- VERSION = 2
- PATCHLEVEL = 6
- SUBLEVEL = 32
--EXTRAVERSION = -131.tg3.220.mlab.i686
-+EXTRAVERSION = .133-vs2.3.0.36.29.6.mlab.maskXX.planetlab
- NAME = Man-Eating Seals of Antiquity
- RHEL_MAJOR = 6
- RHEL_MINOR = 1
diff -Ndur linux-2.6.32-700/net/ipv4/sysctl_net_ipv4.c linux-2.6.32-700-xidmask/net/ipv4/sysctl_net_ipv4.c
--- linux-2.6.32-700/net/ipv4/sysctl_net_ipv4.c 2013-01-10 14:18:50.233320698 -0500
+++ linux-2.6.32-700-xidmask/net/ipv4/sysctl_net_ipv4.c 2013-01-19 15:41:52.767269242 -0500
diff -Ndur linux-2.6.32-700/net/ipv4/web100_stats.c linux-2.6.32-700-xidmask/net/ipv4/web100_stats.c
--- linux-2.6.32-700/net/ipv4/web100_stats.c 2013-01-10 14:18:50.231318735 -0500
-+++ linux-2.6.32-700-xidmask/net/ipv4/web100_stats.c 2013-01-19 23:53:31.434591210 -0500
-@@ -72,7 +72,123 @@
++++ linux-2.6.32-700-xidmask/net/ipv4/web100_stats.c 2013-02-06 22:25:11.711402213 -0500
+@@ -72,7 +72,99 @@
return cid % web100stats_htsize;
}
+
+ if ( 0 != sk->sk_xid ) {
+ vxi = lookup_vx_info(sk->sk_xid);
-+ if ( NULL != vxi ) {
-+ printk("web100_stats_create():\n");
-+ printk(" does xid:%d->ccaps:0x%016llx have 0x%08x set? ",
-+ sk->sk_xid, vxi->vx_ccaps, VXC_ENABLE_WEB100);
-+ if ( ! vx_info_ccaps(vxi, VXC_ENABLE_WEB100) ) {
-+ printk("no!\n");
-+ printk(" SKIPPING create for xid(%d)\n", sk->sk_xid);
-+ /* do not create stats struct */
-+ return 0;
-+ } else {
-+ printk("yes!\n");
-+ printk(" CREATING stats for xid(%d)\n", sk->sk_xid);
-+ }
-+ } else {
-+ printk(" NO VXINFO for xid:%d\n", sk->sk_xid);
-+ printk(" CREATING stats for xid(%d)\n", sk->sk_xid);
-+ }
++ if ( NULL != vxi && !vx_info_ccaps(vxi, VXC_ENABLE_WEB100) ) {
++ /* do not create stats struct */
++ return 0;
++ }
+ }
+ /* create stats struct */
+ return 1;
+
+ if ( 0 == vx_current_xid() ) {
+ // always ok for xid=0 (root context)
-+ printk("vx_can_read_stats(): TRUE b/c current->xid==0\n");
+ return 1;
+ }
+
+ vxi = current_vx_info();
+ if ( NULL == vxi ) {
+ /* non-root context is missing vx_info; cannot check access flags */
-+ printk("vx_can_read_stats(): FALSE b/c current->xid:%d vxi==NULL\n", vx_current_xid());
+ return 0;
+ }
+
+ if ( vx_current_xid() == sysctl_web100_sidestream_xid ) {
+ /* the sidestream xid can view all stats. */
-+ printk("vx_can_read_stats(): TRUE! b/c xid:%d == sstream:%d\n",
-+ vx_current_xid(), sysctl_web100_sidestream_xid);
+ return 1;
+ }
+
+ sk = stats->wc_sk;
+ if ( vx_current_xid() == sk->sk_xid ) {
+ /* the xid is the socket owner so can see it's own connections */
-+ printk("vx_can_read_stats(): TRUE! b/c xid:%d == sk_xid:%d\n",
-+ vx_current_xid(), sk->sk_xid);
+ return 1;
+ }
+
+ /* all checks have failed, so deny read permission. */
-+ printk("vx_can_read_stats(): FALSE!\n");
-+ printk(" b/c xid:%d != curr:%d\n",
-+ vx_current_xid(), sk->sk_xid);
-+ printk(" AND, xid:%d != sidestream:%d\n",
-+ vx_current_xid(), sysctl_web100_sidestream_xid);
+ return 0;
+}
+
{
struct web100stats *stats;
-@@ -83,6 +199,13 @@
+@@ -83,7 +175,10 @@
stats = web100stats_ht[web100stats_hash(cid)];
while (stats && stats->wc_cid != cid)
stats = stats->wc_hash_next;
-+ if ( 1 == vx_filter ) {
-+ if ( 1 == vx_can_read_stats(stats) ) {
-+ return stats;
-+ } else {
-+ return NULL;
-+ }
-+ }
- return stats;
+- return stats;
++ if ( 0 == vx_filter || 1 == vx_can_read_stats(stats) ) {
++ return stats;
++ }
++ return NULL;
}
-@@ -99,7 +222,8 @@
+ /* This will get really slow as the cid space fills. This can be done
+@@ -99,7 +194,8 @@
i = web100stats_next_cid;
do {
break;
i = (i + 1) % WEB100_MAX_CONNS;
} while (i != web100stats_next_cid);
-@@ -252,6 +376,13 @@
+@@ -252,6 +348,12 @@
struct web100directs *vars;
struct tcp_sock *tp = tcp_sk(sk);
struct timeval tv;
-+ struct vx_info *vxi;
+
+ if ( 0 == vx_can_create_stats(sk) ) {
+ /* do not create web100 stats for this socket */
if ((stats = kmalloc(sizeof (struct web100stats), gfp_any())) == NULL)
return -ENOMEM;
-@@ -294,6 +425,9 @@
+@@ -294,6 +396,9 @@
void web100_stats_destroy(struct web100stats *stats)
{
/* Attribute final sndlim time. */
web100_update_sndlim(tcp_sk(stats->wc_sk), stats->wc_limstate);
-Binary files linux-2.6.32-700/net/ipv4/.web100_stats.c.swp and linux-2.6.32-700-xidmask/net/ipv4/.web100_stats.c.swp differ
diff -Ndur linux-2.6.32-700/net/ipv6/tcp_ipv6.c linux-2.6.32-700-xidmask/net/ipv6/tcp_ipv6.c
--- linux-2.6.32-700/net/ipv6/tcp_ipv6.c 2013-01-10 14:18:50.219284269 -0500
+++ linux-2.6.32-700-xidmask/net/ipv6/tcp_ipv6.c 2013-01-10 14:21:16.373337472 -0500