diff --git a/include/nuttx/net/netconfig.h b/include/nuttx/net/netconfig.h index 71e7430567..adeb7ed823 100644 --- a/include/nuttx/net/netconfig.h +++ b/include/nuttx/net/netconfig.h @@ -210,7 +210,7 @@ * This should normally not be changed. */ -#define IP_TTL 64 +#define IP_TTL_DEFAULT 64 /* Network drivers often receive packets with garbage at the end * and are longer than the size of packet in the TCP header. The diff --git a/net/icmp/icmp_sendmsg.c b/net/icmp/icmp_sendmsg.c index bc874c9d43..a4a8f83486 100644 --- a/net/icmp/icmp_sendmsg.c +++ b/net/icmp/icmp_sendmsg.c @@ -133,7 +133,7 @@ static void sendto_request(FAR struct net_driver_s *dev, ipv4->ipid[1] = g_ipid & 0xff; ipv4->ipoffset[0] = IP_FLAG_DONTFRAG >> 8; ipv4->ipoffset[1] = IP_FLAG_DONTFRAG & 0xff; - ipv4->ttl = IP_TTL; + ipv4->ttl = IP_TTL_DEFAULT; ipv4->proto = IP_PROTO_ICMP; net_ipv4addr_hdrcopy(ipv4->srcipaddr, &dev->d_ipaddr); diff --git a/net/sixlowpan/sixlowpan_tcpsend.c b/net/sixlowpan/sixlowpan_tcpsend.c index cf7c92d0d8..f359bc8d6b 100644 --- a/net/sixlowpan/sixlowpan_tcpsend.c +++ b/net/sixlowpan/sixlowpan_tcpsend.c @@ -194,7 +194,7 @@ static int sixlowpan_tcp_header(FAR struct tcp_conn_s *conn, ipv6tcp->ipv6.tcf = 0x00; ipv6tcp->ipv6.flow = 0x00; ipv6tcp->ipv6.proto = IP_PROTO_TCP; - ipv6tcp->ipv6.ttl = IP_TTL; + ipv6tcp->ipv6.ttl = IP_TTL_DEFAULT; /* The IPv6 header length field does not include the size of IPv6 IP * header. diff --git a/net/tcp/tcp_send.c b/net/tcp/tcp_send.c index 0f4ab400ca..fd7eca15c0 100644 --- a/net/tcp/tcp_send.c +++ b/net/tcp/tcp_send.c @@ -139,7 +139,7 @@ static inline void tcp_ipv4_sendcomplete(FAR struct net_driver_s *dev, */ ipv4->proto = IP_PROTO_TCP; - ipv4->ttl = IP_TTL; + ipv4->ttl = IP_TTL_DEFAULT; ipv4->vhl = 0x45; /* At this point the TCP header holds the size of the payload, the @@ -210,7 +210,7 @@ static inline void tcp_ipv6_sendcomplete(FAR struct net_driver_s *dev, */ ipv6->proto = IP_PROTO_TCP; - ipv6->ttl = IP_TTL; + ipv6->ttl = IP_TTL_DEFAULT; /* At this point the TCP header holds the size of the payload, the * TCP header, and the IP header. For IPv6, the IP length field does diff --git a/net/udp/udp_conn.c b/net/udp/udp_conn.c index c2af6d9778..1aba26c88a 100644 --- a/net/udp/udp_conn.c +++ b/net/udp/udp_conn.c @@ -584,7 +584,7 @@ FAR struct udp_conn_s *udp_alloc(uint8_t domain) conn->boundto = 0; /* Not bound to any interface */ #endif conn->lport = 0; - conn->ttl = IP_TTL; + conn->ttl = IP_TTL_DEFAULT; #if CONFIG_NET_RECV_BUFSIZE > 0 conn->rcvbufs = CONFIG_NET_RECV_BUFSIZE; #endif