- check vnet_active before executing runtime vnet code
authorMark Huang <mlhuang@cs.princeton.edu>
Thu, 10 Feb 2005 19:39:16 +0000 (19:39 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Thu, 10 Feb 2005 19:39:16 +0000 (19:39 +0000)
net/ipv4/icmp.c

index fa5b05c..5fc4935 100644 (file)
@@ -1035,7 +1035,7 @@ int icmp_rcv(struct sk_buff *skb)
 
 #if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE)
        /* VNET: Bypass stack if the echo ID was bound to a (presumably raw) socket */
-       if (skb->sk) {
+       if (vnet_active && skb->sk) {
                switch (icmph->type) {
                case ICMP_ECHOREPLY:
                case ICMP_ECHO: