diff --git a/include/nuttx/net/ipv6ext.h b/include/nuttx/net/ipv6ext.h index 4905b2b8418..b1359f33244 100644 --- a/include/nuttx/net/ipv6ext.h +++ b/include/nuttx/net/ipv6ext.h @@ -164,6 +164,7 @@ struct ipv6_extension_s { uint8_t nxthdr; /* Next header */ uint8_t len; /* Extension header length */ + uint8_t pad[6]; /* Pad to a multiple of 8 bytes */ }; /* Hop-by-hop Option Header */ @@ -220,6 +221,7 @@ struct ipv6_router_alert_s uint8_t type; /* Hop-by-hop option number (5) */ uint8_t len; /* Length = 2 */ uint16_t value; /* Value. See OPT_RA_* Definitions */ + uint8_t pad[4]; /* Pad to a multiple of 8 bytes */ }; #endif /* __INCLUDE_NUTTX_NET_IPV6EXT_H */ diff --git a/net/igmp/igmp_poll.c b/net/igmp/igmp_poll.c index fe34a6b82b8..f3f4e1872b1 100644 --- a/net/igmp/igmp_poll.c +++ b/net/igmp/igmp_poll.c @@ -141,8 +141,6 @@ void igmp_poll(FAR struct net_driver_s *dev) { FAR struct igmp_group_s *group; - ninfo("Entry\n"); - /* Setup the poll operation */ dev->d_appdata = &dev->d_buf[NET_LL_HDRLEN(dev) + IPIGMP_HDRLEN]; diff --git a/net/mld/mld_join.c b/net/mld/mld_join.c index 337f43e4993..3f414bb978d 100644 --- a/net/mld/mld_join.c +++ b/net/mld/mld_join.c @@ -113,7 +113,7 @@ int mld_joingroup(FAR const struct ipv6_mreq *mrec) mrec->ipv6mr_multiaddr.s6_addr16[4], mrec->ipv6mr_multiaddr.s6_addr16[5], mrec->ipv6mr_multiaddr.s6_addr16[5], - mrec->ipv6mr_multiaddr.s6_addr16[7); + mrec->ipv6mr_multiaddr.s6_addr16[7]); /* Check if a this address is already in the group */ diff --git a/net/mld/mld_leave.c b/net/mld/mld_leave.c index a2818efa977..6115d0d9988 100644 --- a/net/mld/mld_leave.c +++ b/net/mld/mld_leave.c @@ -113,7 +113,7 @@ int mld_leavegroup(FAR const struct ipv6_mreq *mrec) mrec->ipv6mr_multiaddr.s6_addr16[4], mrec->ipv6mr_multiaddr.s6_addr16[5], mrec->ipv6mr_multiaddr.s6_addr16[5], - mrec->ipv6mr_multiaddr.s6_addr16[7); + mrec->ipv6mr_multiaddr.s6_addr16[7]); /* Find the entry corresponding to the address leaving the group */ diff --git a/net/mld/mld_mcastmac.c b/net/mld/mld_mcastmac.c index 782538309ea..e01d9c85e8a 100644 --- a/net/mld/mld_mcastmac.c +++ b/net/mld/mld_mcastmac.c @@ -70,7 +70,6 @@ static void mld_mcastmac(FAR const net_ipv6addr_t ipaddr, FAR uint8_t *mac) ninfo("Mcast IP: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ipaddr[0], ipaddr[1], ipaddr[2], ipaddr[3], ipaddr[4], ipaddr[5], ipaddr[6], ipaddr[7]); - ninfo("IP: 0") /* For the MAC address by insert the low 32 Bits of the multicast IPv6 * Address into the Ethernet Address . This mapping is from the IETF diff --git a/net/mld/mld_poll.c b/net/mld/mld_poll.c index cd038f7a36c..fedd873de8f 100644 --- a/net/mld/mld_poll.c +++ b/net/mld/mld_poll.c @@ -95,8 +95,6 @@ void mld_poll(FAR struct net_driver_s *dev) { FAR struct mld_group_s *group; - ninfo("Entry\n"); - /* Setup the poll operation */ dev->d_appdata = &dev->d_buf[NET_LL_HDRLEN(dev) + IPv6_HDRLEN]; diff --git a/net/mld/mld_send.c b/net/mld/mld_send.c index 3975acd7f79..3cb7ef6b883 100644 --- a/net/mld/mld_send.c +++ b/net/mld/mld_send.c @@ -78,16 +78,16 @@ #define IPv6BUF ((FAR struct ipv6_hdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev)]) #define RABUF ((FAR struct ipv6_router_alert_s *) \ - &dev->d_buf[NET_LL_HDRLEN(dev)] + IPv6_HDRLEN) + (&dev->d_buf[NET_LL_HDRLEN(dev)] + IPv6_HDRLEN)) #define RASIZE sizeof(struct ipv6_router_alert_s) #define QUERYBUF ((FAR struct mld_mcast_listen_query_s *) \ - &dev->d_buf[NET_LL_HDRLEN(dev)] + IPv6_HDRLEN + RASIZE) + (&dev->d_buf[NET_LL_HDRLEN(dev)] + IPv6_HDRLEN + RASIZE)) #define V1REPORTBUF ((FAR struct mld_mcast_listen_report_v1_s *) \ - &dev->d_buf[NET_LL_HDRLEN(dev)] + IPv6_HDRLEN + RASIZE) + (&dev->d_buf[NET_LL_HDRLEN(dev)] + IPv6_HDRLEN + RASIZE)) #define V2REPORTBUF ((FAR struct mld_mcast_listen_report_v2_s *) \ - &dev->d_buf[NET_LL_HDRLEN(dev)] + IPv6_HDRLEN + RASIZE) + (&dev->d_buf[NET_LL_HDRLEN(dev)] + IPv6_HDRLEN + RASIZE)) #define DONEBUF ((FAR struct mld_mcast_listen_done_v1_s *) \ - &dev->d_buf[NET_LL_HDRLEN(dev)] + IPv6_HDRLEN + RASIZE) + (&dev->d_buf[NET_LL_HDRLEN(dev)] + IPv6_HDRLEN + RASIZE)) /**************************************************************************** * Public Functions @@ -224,6 +224,9 @@ void mld_send(FAR struct net_driver_s *dev, FAR struct mld_group_s *group, case MLD_SEND_V1DONE: /* Send MLDv1 Done message */ destipaddr = g_ipv6_allrouters; break; + + default: /* Can't happen, but eliminates a warning */ + return; } ninfo("destipaddr: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", @@ -243,7 +246,6 @@ void mld_send(FAR struct net_driver_s *dev, FAR struct mld_group_s *group, ra->hbyh.nxthdr = IP_PROTO_ICMP6; /* ICMPv6 payload follows extension header */ ra->hbyh.len = 1; /* One 8-octet option follows */ ra->type = HOPBYHOP_ROUTER_ALERT; /* Router alert */ - ra->len = 2; /* Length */ /* Format the MLD ICMPv6 payload into place after the IPv6 header (with * router alert) @@ -348,6 +350,9 @@ void mld_send(FAR struct net_driver_s *dev, FAR struct mld_group_s *group, MLD_STATINCR(g_netstats.mld.done_sent); } break; + + default: /* Can't happen, but eliminates a warning */ + return; } MLD_STATINCR(g_netstats.icmpv6.sent);