From: Mark Huang Date: Thu, 27 Jan 2005 20:46:24 +0000 (+0000) Subject: - merge revision 1.10 X-Git-Tag: planetlab-3_0-rc10~21 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=307132a6699868fc35a8ac9b761ea9aa4f32b41e;p=linux-2.6.git - merge revision 1.10 date: 2005/01/17 20:01:59; author: mlhuang; state: Exp; lines: +5 -2 - PL3791 fix: Suppress ICMP Unreachable if the port was bound to a (presumably raw) socket --- diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 23f8f511d..41b0117be 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -5,7 +5,7 @@ * * The User Datagram Protocol (UDP). * - * Version: $Id: udp.c,v 1.102 2002/02/01 22:01:04 davem Exp $ + * Version: $Id$ * * Authors: Ross Biro, * Fred N. van Kempen, @@ -1164,8 +1164,11 @@ int udp_rcv(struct sk_buff *skb) if (udp_checksum_complete(skb)) goto csum_error; - UDP_INC_STATS_BH(UDP_MIB_NOPORTS); - icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0); + /* VNET: Suppress ICMP Unreachable if the port was bound to a (presumably raw) socket */ + if (!skb->sk) { + UDP_INC_STATS_BH(UDP_MIB_NOPORTS); + icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0); + } /* * Hmm. We got an UDP packet to a port to which we