mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-10 17:43:39 +08:00
Removed ip_2_ip4/6_c const macros again now that ip_2_ip4/6 macros keep the original const'ness
This commit is contained in:
@@ -163,7 +163,7 @@ icmp6_input(struct pbuf *p, struct netif *inp)
|
||||
/* Determine reply source IPv6 address. */
|
||||
#if LWIP_MULTICAST_PING
|
||||
if (ip6_addr_ismulticast(ip6_current_dest_addr())) {
|
||||
reply_src = ip_2_ip6_c(ip6_select_source_address(inp, ip6_current_src_addr()));
|
||||
reply_src = ip_2_ip6(ip6_select_source_address(inp, ip6_current_src_addr()));
|
||||
if (reply_src == NULL) {
|
||||
/* drop */
|
||||
pbuf_free(p);
|
||||
@@ -323,7 +323,7 @@ icmp6_send_response(struct pbuf *p, u8_t code, u32_t data, u8_t type)
|
||||
reply_dest = ip6_current_src_addr();
|
||||
|
||||
/* Select an address to use as source. */
|
||||
reply_src = ip_2_ip6_c(ip6_select_source_address(netif, reply_dest));
|
||||
reply_src = ip_2_ip6(ip6_select_source_address(netif, reply_dest));
|
||||
if (reply_src == NULL) {
|
||||
/* drop */
|
||||
pbuf_free(q);
|
||||
|
||||
@@ -255,7 +255,7 @@ ip6_select_source_address(struct netif *netif, const ip6_addr_t * dest)
|
||||
else {
|
||||
/* Replace src only if we find a prefix match. */
|
||||
/* TODO find longest matching prefix. */
|
||||
if ((!(ip6_addr_netcmp(ip_2_ip6_c(src), dest))) &&
|
||||
if ((!(ip6_addr_netcmp(ip_2_ip6(src), dest))) &&
|
||||
ip6_addr_netcmp(netif_ip6_addr(netif, i), dest)) {
|
||||
src = netif_ip_addr6(netif, i);
|
||||
}
|
||||
@@ -817,7 +817,7 @@ 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 != IP_HDRINCL) {
|
||||
if (src != NULL && ip6_addr_isany(src)) {
|
||||
src = ip_2_ip6_c(ip6_select_source_address(netif, dest));
|
||||
src = ip_2_ip6(ip6_select_source_address(netif, dest));
|
||||
if ((src == NULL) || ip6_addr_isany(src)) {
|
||||
/* 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"));
|
||||
|
||||
Reference in New Issue
Block a user