- bound vnet mods by #ifdef
authorMark Huang <mlhuang@cs.princeton.edu>
Tue, 1 Feb 2005 03:15:09 +0000 (03:15 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Tue, 1 Feb 2005 03:15:09 +0000 (03:15 +0000)
- bound runtime vnet code by if (vnet_active)
- vnet needs inet_family_ops, export if configured
- PL3976 fix: inet_release(): don't reset sk_xid

net/ipv4/af_inet.c

index 9dbbbf8..d779894 100644 (file)
@@ -396,9 +396,9 @@ int inet_release(struct socket *sock)
                sock->sk = NULL;
                vx_sock_dec(sk);
                clr_vx_info(&sk->sk_vx_info);
-       sk->sk_xid = -1;
+               //sk->sk_xid = -1;
                clr_nx_info(&sk->sk_nx_info);
-       sk->sk_nid = -1;
+               //sk->sk_nid = -1;
                sk->sk_prot->close(sk, timeout);
        }
        return 0;
@@ -843,7 +843,15 @@ struct proto_ops inet_dgram_ops = {
        .sendpage =     inet_sendpage,
 };
 
-static struct net_proto_family inet_family_ops = {
+#if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE)
+int vnet_active = 0;
+EXPORT_SYMBOL(vnet_active);
+struct net_proto_family inet_family_ops;
+EXPORT_SYMBOL(inet_family_ops);
+#else
+static
+#endif
+struct net_proto_family inet_family_ops = {
        .family = PF_INET,
        .create = inet_create,
        .owner  = THIS_MODULE,