From 6ca2bcb5777ed787fd70d7493d3a8670de1aa8a5 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 9 Nov 2018 11:44:01 -0600 Subject: [PATCH] net/icmpv6/icmpv6_input.c: Fix yet another build issue in this file found by build testing. --- net/icmpv6/icmpv6_input.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/icmpv6/icmpv6_input.c b/net/icmpv6/icmpv6_input.c index c4a309b836..5bae9597e1 100644 --- a/net/icmpv6/icmpv6_input.c +++ b/net/icmpv6/icmpv6_input.c @@ -109,8 +109,9 @@ static uint16_t icmpv6_datahandler(FAR struct net_driver_s *dev, unsigned int iplen) { FAR struct ipv6_hdr_s *ipv6; - struct sockaddr_in6 inaddr; + FAR struct icmpv6_hdr_s *icmpv6; FAR struct iob_s *iob; + struct sockaddr_in6 inaddr; uint16_t offset; uint16_t buflen; uint8_t addrsize; @@ -171,6 +172,8 @@ static uint16_t icmpv6_datahandler(FAR struct net_driver_s *dev, /* Copy the new ICMPv6 reply into the I/O buffer chain (without waiting) */ buflen = ICMPv6SIZE; + icmpv6 = ICMPv6BUF; + ret = iob_trycopyin(iob, (FAR uint8_t *)ICMPv6REPLY, buflen, offset, true); if (ret < 0) {