The data in the buffer are aligned to 2 bytes, however
'struct in6_addr' is aligned to 4 bytes. Use the 2 bytes aligned
equivalent 'union ovs_16aligned_in6_addr' instead. This was caught
by one of the OVN tests:
lib/flow.c:1133:25: runtime error: load of misaligned address
0x51400009cc92 for type 'const struct in6_addr *', which requires
4 byte alignment
0x51400009cc92: note: pointer points here
00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00
^
0 0x8255b2 in miniflow_extract /workspace/ovn/ovs/lib/flow.c:1133:25
1 0x81d921 in flow_extract /workspace/ovn/ovs/lib/flow.c:671:5
2 0xa966d4 in ofp_packet_to_string /workspace/ovn/ovs/lib/ofp-print.c:82:5
3 0xa76de2 in ofputil_packet_in_private_format
/workspace/ovn/ovs/lib/ofp-packet.c:1037:24
4 0xa99817 in ofp_print_packet_in /workspace/ovn/ovs/lib/ofp-print.c:132:9
5 0xa97f46 in ofp_to_string__ /workspace/ovn/ovs/lib/ofp-print.c
6 0xa97f46 in ofp_to_string /workspace/ovn/ovs/lib/ofp-print.c:1264:21
7 0xc338f4 in do_send /workspace/ovn/ovs/lib/vconn.c:687:19
8 0xb7f678 in try_send /workspace/ovn/ovs/lib/rconn.c:1128:14
9 0xb7d725 in rconn_send__ /workspace/ovn/ovs/lib/rconn.c:760:13
10 0xb7d8e7 in rconn_send_with_limit /workspace/ovn/ovs/lib/rconn.c:816:17
11 0x6f70de in do_send_packet_ins /workspace/ovn/ovs/ofproto/connmgr.c:1697:13
12 0x6f691f in connmgr_send_async_msg
/workspace/ovn/ovs/ofproto/connmgr.c:1682:9
13 0x5c2d23 in run /workspace/ovn/ovs/ofproto/ofproto-dpif.c:1877:13
14 0x56737f in ofproto_run /workspace/ovn/ovs/ofproto/ofproto.c:1906:13
15 0x50d4fc in bridge_run__ /workspace/ovn/ovs/vswitchd/bridge.c:3287:9
16 0x50a764 in bridge_run /workspace/ovn/ovs/vswitchd/bridge.c:3346:5
17 0x53eed7 in main /workspace/ovn/ovs/vswitchd/ovs-vswitchd.c:130:9
Signed-off-by: Ales Musil <[email protected]>
---
lib/flow.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/flow.c b/lib/flow.c
index dc5fb328d..9be437524 100644
--- a/lib/flow.c
+++ b/lib/flow.c
@@ -408,7 +408,8 @@ parse_ethertype(const void **datap, size_t *sizep)
static inline bool
parse_icmpv6(const void **datap, size_t *sizep,
const struct icmp6_data_header *icmp6,
- ovs_be32 *rso_flags, const struct in6_addr **nd_target,
+ ovs_be32 *rso_flags,
+ const union ovs_16aligned_in6_addr **nd_target,
struct eth_addr arp_buf[2], uint8_t *opt_type)
{
if (icmp6->icmp6_base.icmp6_code != 0 ||
@@ -1117,7 +1118,7 @@ miniflow_extract(struct dp_packet *packet, struct
miniflow *dst)
}
} else if (OVS_LIKELY(nw_proto == IPPROTO_ICMPV6)) {
if (OVS_LIKELY(size >= sizeof(struct icmp6_data_header))) {
- const struct in6_addr *nd_target;
+ const union ovs_16aligned_in6_addr *nd_target;
struct eth_addr arp_buf[2];
/* This will populate whether we received Option 1
* or Option 2. */
--
2.45.2
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev