date: 2005/02/10 19:39:16; author: mlhuang; state: Exp; lines: +1 -1
- check vnet_active before executing runtime vnet code
*
* Alan Cox, <alan@redhat.com>
*
- * Version: $Id: icmp.c,v 1.85 2002/02/01 22:01:03 davem Exp $
+ * Version: $Id$
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
}
}
+#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:
goto drop;
}
}
+#endif
ICMP_INC_STATS_BH(icmp_pointers[icmph->type].input_entry);
icmp_pointers[icmph->type].handler(skb);