diff --git a/include/nuttx/net/netconfig.h b/include/nuttx/net/netconfig.h index dea2684bbb1..cc0fdd17ca6 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 #ifdef CONFIG_NET_TCP_REASSEMBLY # ifndef CONFIG_NET_TCP_REASS_MAXAGE diff --git a/net/icmp/icmp_sendmsg.c b/net/icmp/icmp_sendmsg.c index bcfd8eb5802..530dd137e37 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 a9b3b133023..6846baf4f3a 100644 --- a/net/sixlowpan/sixlowpan_tcpsend.c +++ b/net/sixlowpan/sixlowpan_tcpsend.c @@ -193,7 +193,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 190d4e6ee9b..9dcd0cbf88f 100644 --- a/net/tcp/tcp_send.c +++ b/net/tcp/tcp_send.c @@ -137,7 +137,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 @@ -208,7 +208,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 6a430885776..c5716fe4e9e 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; #ifdef CONFIG_NET_UDP_WRITE_BUFFERS /* Initialize the write buffer lists */