* [Qemu-devel] [PATCH] slirp: Prevent sending ICMP error replies to source-only addresses
@ 2012-02-08 9:22 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2012-02-08 9:22 UTC (permalink / raw)
To: qemu-devel; +Cc: Bjoern Bornemann, Roy Tam
This triggered the related assert in arp_table_search.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
slirp/ip_icmp.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/slirp/ip_icmp.c b/slirp/ip_icmp.c
index 4b43994..5dbf21d 100644
--- a/slirp/ip_icmp.c
+++ b/slirp/ip_icmp.c
@@ -262,6 +262,11 @@ icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize,
#endif
if(ip->ip_off & IP_OFFMASK) goto end_error; /* Only reply to fragment 0 */
+ /* Do not reply to source-only IPs */
+ if ((ip->ip_src.s_addr & htonl(~(0xf << 28))) == 0) {
+ goto end_error;
+ }
+
shlen=ip->ip_hl << 2;
s_ip_len=ip->ip_len;
if(ip->ip_p == IPPROTO_ICMP) {
--
1.7.3.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-02-08 9:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-08 9:22 [Qemu-devel] [PATCH] slirp: Prevent sending ICMP error replies to source-only addresses Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).