qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Bug 824650] Re: Latest GIT assert error in arp_table.c


From: Bjoern Bornemann
Subject: [Qemu-devel] [Bug 824650] Re: Latest GIT assert error in arp_table.c
Date: Fri, 10 Feb 2012 08:42:55 -0000

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) {


Fix seem to work. No crashes so far.


Thanks a lot to Jan Kiszka

** Changed in: qemu
       Status: New => Fix Committed

** Changed in: qemu
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/824650

Title:
  Latest GIT assert error in arp_table.c

Status in QEMU:
  Fix Released

Bug description:
  The latest git version of qemu (commit
  8cc7c3952d4d0a681d8d4c3ac89a206a5bfd7f00) crashes after a few minutes.
  All was fine up to a few days ago.  This is wth both x86 and sparc
  emulation, on an x86_64 host.

  e.g. qemu-system-sparc -drive
  file=netbsd5.0.2-sparc,index=0,media=disk,cache=unsafe -m 256 -boot c
  -nographic -redir tcp:2232::22:

   qemu-system-sparc: slirp/arp_table.c:75: arp_table_search: Assertion
  `(ip_addr & (__extension__ ({ register unsigned int __v, __x = (~(0xf
  << 28)); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000)
  >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) |
  (((__x) & 0x000000ff) << 24)); else __asm__ ("bswap %0" : "=r" (__v) :
  "0" (__x)); __v; }))) != 0' failed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/824650/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]