X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fipv6.h;h=6f1e221186b0be440dd6a4186a2106b3ba5767d5;hb=0530bf8704f92e9741d969d6576bf8e2bbf026be;hp=7c06de3dbca935cebda98241c9fae6afd854bfc4;hpb=33f0918cde36accb606271c379bc8e75973e9d59;p=tinc diff --git a/src/ipv6.h b/src/ipv6.h index 7c06de3d..6f1e2211 100644 --- a/src/ipv6.h +++ b/src/ipv6.h @@ -60,6 +60,8 @@ struct ip6_hdr { #define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim #endif +STATIC_ASSERT(sizeof(struct ip6_hdr) == 40, "ip6_hdr has incorrect size"); + #ifndef HAVE_STRUCT_ICMP6_HDR struct icmp6_hdr { uint8_t icmp6_type; @@ -86,6 +88,8 @@ struct icmp6_hdr { #define icmp6_mtu icmp6_data32[0] #endif +STATIC_ASSERT(sizeof(struct icmp6_hdr) == 8, "icmp6_hdr has incorrect size"); + #ifndef HAVE_STRUCT_ND_NEIGHBOR_SOLICIT struct nd_neighbor_solicit { struct icmp6_hdr nd_ns_hdr; @@ -99,6 +103,8 @@ struct nd_neighbor_solicit { #define nd_ns_reserved nd_ns_hdr.icmp6_data32[0] #endif +STATIC_ASSERT(sizeof(struct nd_neighbor_solicit) == 24, "nd_neighbor_solicit has incorrect size"); + #ifndef HAVE_STRUCT_ND_OPT_HDR struct nd_opt_hdr { uint8_t nd_opt_type; @@ -106,4 +112,6 @@ struct nd_opt_hdr { }; #endif +STATIC_ASSERT(sizeof(struct nd_opt_hdr) == 2, "nd_opt_hdr has incorrect size"); + #endif