diff --git a/CHANGELOG b/CHANGELOG index 90cb7769..808d34f0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -96,6 +96,10 @@ HISTORY ++ Bugfixes: + 2014-02-25: Simon Goldschmidt + * netif.c/.h, udp.c: fixed bug #39225 udp.c uses netif_matches_ip6_addr() incorrectly; + renamed function netif_matches_ip6_addr() to netif_get_ip6_addr_match() + 2014-02-25: Simon Goldschmidt * igmp.c: fixed bug #39145 IGMP membership report for 224.0.0.1 diff --git a/src/core/netif.c b/src/core/netif.c index ce448858..36e801b3 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -872,7 +872,7 @@ netif_poll_all(void) #if LWIP_IPV6 s8_t -netif_matches_ip6_addr(struct netif * netif, ip6_addr_t * ip6addr) +netif_get_ip6_addr_match(struct netif * netif, ip6_addr_t * ip6addr) { s8_t i; for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { diff --git a/src/core/udp.c b/src/core/udp.c index ac0e56d1..986e6992 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -307,7 +307,7 @@ udp_input(struct pbuf *p, struct netif *inp) } else { #if LWIP_IPV6 if (ip_current_is_v6()) { - for_us = netif_matches_ip6_addr(inp, ip6_current_dest_addr()); + for_us = netif_get_ip6_addr_match(inp, ip6_current_dest_addr()) >= 0; } else #endif /* LWIP_IPV6 */ { @@ -721,7 +721,7 @@ udp_sendto_if_chksum(struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *dst_ip, } } else { /* use UDP PCB local IPv6 address as source address, if still valid. */ - if (netif_matches_ip6_addr(netif, ipX_2_ip6(&pcb->local_ip)) < 0) { + if (netif_get_ip6_addr_match(netif, ipX_2_ip6(&pcb->local_ip)) < 0) { /* Address isn't valid anymore. */ if (q != p) { /* free the header pbuf */ diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index 35fee3c8..426e8141 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -370,7 +370,7 @@ void netif_poll_all(void); #define netif_ip6_addr(netif, i) (&((netif)->ip6_addr[(i)])) #define netif_ip6_addr_state(netif, i) ((netif)->ip6_addr_state[(i)]) #define netif_ip6_addr_set_state(netif, i, state) ((netif)->ip6_addr_state[(i)] = (state)) -s8_t netif_matches_ip6_addr(struct netif * netif, ip6_addr_t * ip6addr); +s8_t netif_get_ip6_addr_match(struct netif * netif, ip6_addr_t * ip6addr); void netif_create_ip6_linklocal_address(struct netif * netif, u8_t from_mac_48bit); #endif /* LWIP_IPV6 */