fixed const warning for !IPV6_FRAG_COPYHEADER

This commit is contained in:
sg
2015-09-17 21:59:54 +02:00
parent 2f3dcf7a16
commit 39e32ea7c1
2 changed files with 14 additions and 12 deletions

View File

@@ -336,7 +336,8 @@ ip6_reass(struct pbuf *p)
#if IPV6_FRAG_COPYHEADER
MEMCPY(&ipr->iphdr, ip6_current_header(), IP6_HLEN);
#else /* IPV6_FRAG_COPYHEADER */
ipr->iphdr = (struct ip6_hdr *)ip6_current_header();
/* need to use the none-const pointer here: */
ipr->iphdr = ip_data.current_ip6_header;
#endif /* IPV6_FRAG_COPYHEADER */
/* copy the fragmented packet id. */
@@ -475,7 +476,8 @@ ip6_reass(struct pbuf *p)
MEMCPY(&ipr->iphdr, ip6_current_header(), IP6_HLEN);
}
#else /* IPV6_FRAG_COPYHEADER */
ipr->iphdr = (struct ip6_hdr *)ip6_current_header();
/* need to use the none-const pointer here: */
ipr->iphdr = ip_data.current_ip6_header;
#endif /* IPV6_FRAG_COPYHEADER */
}