From 7a860b5c1628f14ce9120723ec99d1257f90c7d2 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Fri, 4 Mar 2005 13:57:24 +0000 Subject: [PATCH] - 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 --- net/ipv4/icmp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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, * - * 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); -- 2.47.0