Skip to content

Commit

Permalink
Accept packets with TTL=1
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Edgar E. Iglesias <[email protected]>
  • Loading branch information
hpoussin authored and edgarigl committed Sep 17, 2010
1 parent abdfd95 commit 0d49175
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slirp/ip_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0d49175

Please sign in to comment.