mirror of https://gitee.com/openkylin/qemu.git
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 Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
This commit is contained in:
parent
abdfd9500e
commit
0d491754d0
|
@ -144,7 +144,7 @@ ip_input(struct mbuf *m)
|
||||||
m_adj(m, ip->ip_len - m->m_len);
|
m_adj(m, ip->ip_len - m->m_len);
|
||||||
|
|
||||||
/* check ip_ttl for a correct ICMP reply */
|
/* 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");
|
icmp_error(m, ICMP_TIMXCEED,ICMP_TIMXCEED_INTRANS, 0,"ttl");
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue