From: Mark Huang <mlhuang@cs.princeton.edu> Date: Fri, 4 Mar 2005 13:57:24 +0000 (+0000) Subject: - merge revision 1.10 X-Git-Tag: planetlab-3_0-rc13~9 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=7a860b5c1628f14ce9120723ec99d1257f90c7d2;p=linux-2.6.git - merge revision 1.10 date: 2005/02/10 19:39:16; author: mlhuang; state: Exp; lines: +1 -1 - check vnet_active before executing runtime vnet code --- diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index e75fde69a..78754b657 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -3,7 +3,7 @@ * * 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 @@ -1035,8 +1035,9 @@ 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: @@ -1049,6 +1050,7 @@ int icmp_rcv(struct sk_buff *skb) goto drop; } } +#endif ICMP_INC_STATS_BH(icmp_pointers[icmph->type].input_entry); icmp_pointers[icmph->type].handler(skb);