mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-23 06:35:57 +00:00
fixes bug #36389: Use IPv6 Src Address of Echo Response as Destination
Address in Echo Response
This commit is contained in:
parent
3dcd33b08f
commit
bfa28f4c30
|
@ -158,6 +158,8 @@ icmp6_input(struct pbuf *p, struct netif *inp)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Determine reply source IPv6 address. */
|
/* Determine reply source IPv6 address. */
|
||||||
|
#if LWIP_MULTICAST_PING
|
||||||
|
if (ip6_addr_ismulticast(ip6_current_dest_addr())) {
|
||||||
reply_src = ip6_select_source_address(inp, ip6_current_src_addr());
|
reply_src = ip6_select_source_address(inp, ip6_current_src_addr());
|
||||||
if (reply_src == NULL) {
|
if (reply_src == NULL) {
|
||||||
/* drop */
|
/* drop */
|
||||||
|
@ -166,6 +168,12 @@ icmp6_input(struct pbuf *p, struct netif *inp)
|
||||||
ICMP6_STATS_INC(icmp6.rterr);
|
ICMP6_STATS_INC(icmp6.rterr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif /* LWIP_MULTICAST_PING */
|
||||||
|
{
|
||||||
|
reply_src = ip6_current_dest_addr();
|
||||||
|
}
|
||||||
|
|
||||||
/* Set fields in reply. */
|
/* Set fields in reply. */
|
||||||
((struct icmp6_echo_hdr *)(r->payload))->type = ICMP6_TYPE_EREP;
|
((struct icmp6_echo_hdr *)(r->payload))->type = ICMP6_TYPE_EREP;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user