mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-21 07:36:55 +08:00
changed IP_IS_V6_VAL() to take an instance, not a pointer (to get the _val() functions the same)
This commit is contained in:
@@ -244,7 +244,7 @@ snmp_send_trap(s8_t generic_trap, const struct snmp_obj_id *eoid, s32_t specific
|
||||
ip_route_get_local_ip(PCB_ISIPV6(trap_msg.pcb), &trap_msg.pcb->local_ip,
|
||||
&td->dip, dst_if, dst_ip, &dst_ip_storage);
|
||||
if ((dst_if != NULL) && (dst_ip != NULL)) {
|
||||
trap_msg.sip_raw_len = (IP_IS_V6_VAL(dst_ip) ? 16 : 4);
|
||||
trap_msg.sip_raw_len = (IP_IS_V6_VAL(*dst_ip) ? 16 : 4);
|
||||
memcpy(trap_msg.sip_raw, dst_ip, trap_msg.sip_raw_len);
|
||||
trap_msg.gen_trap = generic_trap;
|
||||
trap_msg.spc_trap = specific_trap;
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
"The Dynamic and/or Private Ports are those from 49152 through 65535" */
|
||||
#define TCP_LOCAL_PORT_RANGE_START 0xc000
|
||||
#define TCP_LOCAL_PORT_RANGE_END 0xffff
|
||||
#define TCP_ENSURE_LOCAL_PORT_RANGE(port) (((port) & ~TCP_LOCAL_PORT_RANGE_START) + TCP_LOCAL_PORT_RANGE_START)
|
||||
#define TCP_ENSURE_LOCAL_PORT_RANGE(port) ((u16_t)(((port) & ~TCP_LOCAL_PORT_RANGE_START) + TCP_LOCAL_PORT_RANGE_START))
|
||||
#endif
|
||||
|
||||
#if LWIP_TCP_KEEPALIVE
|
||||
@@ -1845,7 +1845,7 @@ tcp_netif_ipv4_addr_changed_pcblist(const ip4_addr_t* old_addr, struct tcp_pcb*
|
||||
pcb = pcb_list;
|
||||
while (pcb != NULL) {
|
||||
/* PCB bound to current local interface address? */
|
||||
if (!IP_IS_V6_VAL(&pcb->local_ip) && ip4_addr_cmp(ip_2_ip4(&pcb->local_ip), old_addr)
|
||||
if (!IP_IS_V6_VAL(pcb->local_ip) && ip4_addr_cmp(ip_2_ip4(&pcb->local_ip), old_addr)
|
||||
#if LWIP_AUTOIP
|
||||
/* connections to link-local addresses must persist (RFC3927 ch. 1.9) */
|
||||
&& !ip4_addr_islinklocal(ip_2_ip4(&pcb->local_ip))
|
||||
@@ -1879,7 +1879,7 @@ void tcp_netif_ipv4_addr_changed(const ip4_addr_t* old_addr, const ip4_addr_t* n
|
||||
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = next) {
|
||||
next = lpcb->next;
|
||||
/* Is this an IPv4 pcb? */
|
||||
if (!IP_IS_V6_VAL(&lpcb->local_ip)) {
|
||||
if (!IP_IS_V6_VAL(lpcb->local_ip)) {
|
||||
/* PCB bound to current local interface address? */
|
||||
if ((!(ip4_addr_isany(ip_2_ip4(&lpcb->local_ip)))) &&
|
||||
(ip4_addr_cmp(ip_2_ip4(&lpcb->local_ip), old_addr))) {
|
||||
|
||||
Reference in New Issue
Block a user