[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1248219127-3203-1-git-send-email-hagen@jauu.net>
Date: Wed, 22 Jul 2009 01:32:07 +0200
From: Hagen Paul Pfeifer <hagen@...u.net>
To: netdev@...r.kernel.org
Subject: [PATCH 1/1] ipv4: IP_RECVERR should also enqueue source quench messages
Currently ICMP source quench messages are silently dropped and not
enqueued in a per-socket error queue. The socket option IP_RECVERR
enables a connected datagram socket to notice error conditions received
via ICMP. This modification allows applications to notice ICMP source
quench error condition too.
Side note: source quench are obsolete since day ~0 and are one of the
early design mistakes of the Internet. Anyway, this does not interfere
with the fact that a connected socket should not be informed about
received source quench messages.
Signed-off-by: Hagen Paul Pfeifer <hagen@...u.net>
---
net/ipv4/raw.c | 3 ++-
net/ipv4/udp.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 2979f14..1d73953 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -229,7 +229,8 @@ static void raw_err(struct sock *sk, struct sk_buff *skb, u32 info)
err = EHOSTUNREACH;
break;
case ICMP_SOURCE_QUENCH:
- return;
+ err = ENOBUFS;
+ break;
case ICMP_PARAMETERPROB:
err = EPROTO;
harderr = 1;
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 80e3812..ba4a4a8 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -409,7 +409,8 @@ void __udp4_lib_err(struct sk_buff *skb, u32 info, struct udp_table *udptable)
err = EHOSTUNREACH;
break;
case ICMP_SOURCE_QUENCH:
- goto out;
+ err = ENOBUFS;
+ break;
case ICMP_PARAMETERPROB:
err = EPROTO;
harderr = 1;
--
1.6.3.GIT
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists