From: Mark Huang Date: Mon, 17 Jan 2005 20:01:59 +0000 (+0000) Subject: - PL3791 fix: Suppress ICMP Unreachable if the port was bound to a (presumably raw... X-Git-Tag: before-fedora-2_6_18-1_2239_FC5-vs2_0_2_2-rc6-merge~292 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=7100de193a1848d14a1221b9e83d6c2f2ad93f5a;p=linux-2.6.git - 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 ad097f510..d95648244 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1237,8 +1237,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