mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-22 16:16:55 +08:00
Use udp_get_multicast_ttl/udp_set_multicast_ttl accessors where applicable
This commit is contained in:
@@ -852,7 +852,7 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d
|
||||
|
||||
/* Determine TTL to use */
|
||||
#if LWIP_MULTICAST_TX_OPTIONS
|
||||
ttl = (ip_addr_ismulticast(dst_ip) ? pcb->mcast_ttl : pcb->ttl);
|
||||
ttl = (ip_addr_ismulticast(dst_ip) ? udp_get_multicast_ttl(pcb) : pcb->ttl);
|
||||
#else /* LWIP_MULTICAST_TX_OPTIONS */
|
||||
ttl = pcb->ttl;
|
||||
#endif /* LWIP_MULTICAST_TX_OPTIONS */
|
||||
@@ -1134,7 +1134,7 @@ udp_new(void)
|
||||
memset(pcb, 0, sizeof(struct udp_pcb));
|
||||
pcb->ttl = UDP_TTL;
|
||||
#if LWIP_MULTICAST_TX_OPTIONS
|
||||
pcb->mcast_ttl = UDP_TTL;
|
||||
udp_set_multicast_ttl(pcb, UDP_TTL);
|
||||
#endif /* LWIP_MULTICAST_TX_OPTIONS */
|
||||
}
|
||||
return pcb;
|
||||
|
||||
Reference in New Issue
Block a user