]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/commitdiff
Accept packets with TTL=1
authorHervé Poussineau <hpoussin@reactos.org>
Mon, 13 Sep 2010 21:01:30 +0000 (23:01 +0200)
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>
Fri, 17 Sep 2010 10:46:27 +0000 (12:46 +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 <hpoussin@reactos.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
slirp/ip_input.c

index 0fe0ff779eb5cd52e34fbf5b9b4190ca40f264bd..768ab0cd497360ed1e29634603af86abbaafd26c 100644 (file)
@@ -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;
        }