IP_TTL is an IP socket option, not a TTL value. Use IPDEFTTL

instead.
This commit is contained in:
Marcel Moolenaar 2009-11-05 06:08:04 +00:00
parent 5639f997b7
commit c2ef543ba1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=198941

View File

@ -90,7 +90,7 @@ sendudp(d, pkt, len)
ip->ip_hl = sizeof(*ip) >> 2; /* half-char */
ip->ip_len = htons(len);
ip->ip_p = IPPROTO_UDP; /* char */
ip->ip_ttl = IP_TTL; /* char */
ip->ip_ttl = IPDEFTTL; /* char */
ip->ip_src = d->myip;
ip->ip_dst = d->destip;
ip->ip_sum = in_cksum(ip, sizeof(*ip)); /* short, but special */