qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] [slirp] Accept packets with TTL=1


From: Hervé Poussineau
Subject: [Qemu-devel] [PATCH] [slirp] Accept packets with TTL=1
Date: Mon, 13 Sep 2010 23:01:30 +0200

Packets with TTL=1 may be directed to local network (DHCP/DNS servers for 
example), so don't discard them
This is required by old versions of NetBSD which send DHCP DISCOVER packets 
with TTL=1

Signed-off-by: Hervé Poussineau <address@hidden>
---
 slirp/ip_input.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/slirp/ip_input.c b/slirp/ip_input.c
index 0fe0ff7..768ab0c 100644
--- a/slirp/ip_input.c
+++ b/slirp/ip_input.c
@@ -144,7 +144,7 @@ ip_input(struct mbuf *m)
           m_adj(m, ip->ip_len - m->m_len);
 
        /* check ip_ttl for a correct ICMP reply */
-       if(ip->ip_ttl==0 || ip->ip_ttl==1) {
+       if(ip->ip_ttl==0) {
          icmp_error(m, ICMP_TIMXCEED,ICMP_TIMXCEED_INTRANS, 0,"ttl");
          goto bad;
        }
-- 
1.7.1.GIT




reply via email to

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