fixed bug #39225 udp.c uses netif_matches_ip6_addr() incorrectly; renamed function netif_matches_ip6_addr() to netif_get_ip6_addr_match()

This commit is contained in:
Simon Goldschmidt 2014-02-25 22:30:46 +01:00
parent 7b63878926
commit dceed2ea5c
4 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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++) {

View File

@ -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 */

View File

@ -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 */