} nat;
#endif /* CONFIG_IP_NF_NAT_NEEDED */
+#if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE)
/* VServer context id */
xid_t xid[IP_CT_DIR_MAX];
+#endif
/* Traversed often, so hopefully in different cacheline to top */
/* These are my tuples; original and reply */
#endif
#endif
+#if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE)
xid_t xid; /* VServer context ID */
-
+#endif
/* These elements must be at the end, see alloc_skb() for details. */
unsigned int truesize;
#define SOL_NETBEUI 267
#define SOL_LLC 268
+#if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE)
/* PlanetLab PL2525: reset the context ID of an existing socket */
#define SO_SETXID SO_PEERCRED
+#endif
/* IPX options */
#define IPX_TYPE 1
source "net/decnet/netfilter/Kconfig"
source "net/bridge/netfilter/Kconfig"
+config VNET
+ tristate "PlanetLab Virtualized NETwork access"
+ depends on IP_NF_CONNTRACK
+ ---help---
+ VNET associates IP connections with VServer virtual contexts
+ and ensures that unprivileged contexts can receive only packets
+ related to connections initiated by, or bound to, sockets
+ created in their contexts.
+
+ For now, enabling or disabling this option does not compile
+ the driver or activate any non-default code paths. Compile
+ and load the VNET module separately.
+
+ If unsure, say N.
+
endif
source "net/xfrm/Kconfig"
#endif
#endif
+#if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE)
C(xid);
+#endif
C(truesize);
atomic_set(&n->users, 1);
C(head);
#endif
new->tc_index = old->tc_index;
#endif
+#if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE)
new->xid = old->xid;
+#endif
atomic_set(&new->users, 1);
skb_shinfo(new)->tso_size = skb_shinfo(old)->tso_size;
skb_shinfo(new)->tso_segs = skb_shinfo(old)->tso_segs;
clear_bit(SOCK_PASS_CRED, &sock->flags);
break;
+#if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE)
case SO_SETXID:
if (current->xid) {
ret = -EPERM;
}
sk->sk_xid = val;
break;
+#endif
case SO_TIMESTAMP:
sk->sk_rcvtstamp = valbool;