Skip to content

Commit

Permalink
be sure to initialize IPv4 TTL to non-zero, when IPv4 mapped address …
Browse files Browse the repository at this point in the history
…is used.

in6p may carry ip6_hlim == 0 if there's no IPv6 configuration.

we should revisit it from hoplimit selection point of view too - we should
differentiate between "interface TTL is 0" and "this interface is not ready"
(in terms of nd_ifinfo)
  • Loading branch information
itojun committed Nov 6, 2000
1 parent 3fad77c commit 32fe846
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions netbsd/sys/netinet/tcp_output.c
Expand Up @@ -941,6 +941,12 @@ tcp_output(tp)
#ifdef INET6
else if (tp->t_in6pcb) {
ip->ip_ttl = tp->t_in6pcb->in6p_ip6.ip6_hlim;
/*
* XXX ip6_hlim can be 0 if there's no IPv6
* configuration
*/
if (ip->ip_ttl == 0)
ip->ip_ttl = ip_defttl;
ip->ip_tos = 0; /*XXX*/
}
#endif
Expand Down

0 comments on commit 32fe846

Please sign in to comment.