2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

packets: Do not use zero sized array in icmp header.

Visual studio supports zero-size array within a struct or union,
but has to be the last element. GCC does not have this restriction.

icmp headers got included inside 'struct ovs_nd_msg' through
commit e60e935b1f (Implement set-field for IPv6 ND fields (nd_target,
nd_sll,and nd_tll). This causes compilation error while using MSVC.

Since icmp[6]_data in the icmp[6]_header is not used anywhere, just remove
them.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Gurucharan Shetty
2015-01-15 10:24:03 -08:00
parent 6bb81d0421
commit 233c7ef3fa

View File

@@ -518,7 +518,6 @@ struct icmp_header {
} frag;
ovs_16aligned_be32 gateway;
} icmp_fields;
uint8_t icmp_data[0];
};
BUILD_ASSERT_DECL(ICMP_HEADER_LEN == sizeof(struct icmp_header));
@@ -643,7 +642,6 @@ struct icmp6_header {
uint8_t icmp6_type;
uint8_t icmp6_code;
ovs_be16 icmp6_cksum;
uint8_t icmp6_data[0];
};
BUILD_ASSERT_DECL(ICMP6_HEADER_LEN == sizeof(struct icmp6_header));