Patch #9250 (slightly changed): fix source substitution in ip6_output_if() (broken in 2014 with be75c483d0)

Signed-off-by: sg <goldsimon@gmx.de>
This commit is contained in:
David van Moolenbroek 2017-02-08 22:16:32 +01:00 committed by sg
parent 21737f57e5
commit fffd61c746

View File

@ -926,8 +926,8 @@ ip6_output_if(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest,
const ip6_addr_t *src_used = src;
if (dest != LWIP_IP_HDRINCL) {
if (src != NULL && ip6_addr_isany(src)) {
src = ip_2_ip6(ip6_select_source_address(netif, dest));
if ((src == NULL) || ip6_addr_isany(src)) {
src_used = ip_2_ip6(ip6_select_source_address(netif, dest));
if ((src_used == NULL) || ip6_addr_isany(src_used)) {
/* No appropriate source address was found for this packet. */
LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip6_output: No suitable source address for packet.\n"));
IP6_STATS_INC(ip6.rterr);