Skip to contentSkip to conversation

Accept packets with TTL=1

PATCH Applied Hervé Poussineau 2 participants 3 messages Sep 13, 2010 – Sep 17, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Accept packets with TTL=1

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

---
 slirp/ip_input.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
slirp/ip_input.c +1 -1
index 0fe0ff7..768ab0c 100644
@@ -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;
 	}
Signature · 1 line
1.7.1.GIT
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Hervé Poussineau

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

Quoted 22 lines
---
 slirp/ip_input.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
slirp/ip_input.c +1 -1
index 0fe0ff7..768ab0c 100644
@@ -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;
 	}
Signature · 1 line
1.7.1.GIT
#2 lore raw
In reply to Hervé Poussineau
Quoted 4 lines · Hervé Poussineau

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

Applied, thanks.

Quoted 21 lines
---
 slirp/ip_input.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
slirp/ip_input.c +1 -1
index 0fe0ff7..768ab0c 100644
@@ -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;
 	}
Signature · 1 line
1.7.1.GIT