lib/tc.c:1334:44: runtime error: member access within misaligned address
0x6210001f5a2c for type 'const struct tcf_t', which requires 8 byte alignment
0x6210001f5a2c: note: pointer points here
24 00 06 00 c3 00 00 00 00 00 00 00 c3 00 00 00 ...
^
0 0xd7c7ea in nl_parse_tcf lib/tc.c:1334:44
1 0xd7bd3a in nl_parse_act_police lib/tc.c:1433:9
2 0xd68b1a in nl_parse_single_action lib/tc.c:1922:9
3 0xd62c7e in nl_parse_flower_actions lib/tc.c:1992:19
4 0xd62c7e in nl_parse_flower_options lib/tc.c:2107:12
5 0xd5fa32 in parse_netlink_to_tc_flower lib/tc.c:2155:12
6 0xd21760 in netdev_tc_flow_dump_next lib/netdev-offload-tc.c:1158:13
7 0x94f442 in netdev_flow_dump_next lib/netdev-offload.c:301:14
8 0xcba2f6 in dpif_netlink_flow_dump_next lib/dpif-netlink.c:1901:20
9 0x8665b6 in dpif_flow_dump_next lib/dpif.c:1135:9
10 0xee5f0f in dpctl_dump_flows lib/dpctl.c:1106:12
11 0xee27a3 in dpctl_unixctl_handler lib/dpctl.c:3035:17
12 0xc7f78b in process_command lib/unixctl.c:310:13
13 0xc7f78b in run_connection lib/unixctl.c:344:17
14 0xc7f78b in unixctl_server_run lib/unixctl.c:395:21
15 0x59acb4 in main vswitchd/ovs-vswitchd.c:130:9
16 0x7f1be043acf2 in __libc_start_main (/lib64/libc.so.6+0x3acf2)
17 0x47e91d in _start (vswitchd/ovs-vswitchd+0x47e91d)
Fixes: a9b8cdde69de ("tc: Add support parsing tc police action")
Signed-off-by: Ilya Maximets <[email protected]>
---
lib/tc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/tc.c b/lib/tc.c
index 392dee632..6f4480a85 100644
--- a/lib/tc.c
+++ b/lib/tc.c
@@ -1380,7 +1380,7 @@ nl_parse_act_police(const struct nlattr *options, struct
tc_flower *flower)
const struct tc_police *police;
struct tc_action *action;
struct nlattr *police_tm;
- const struct tcf_t *tm;
+ struct tcf_t tm;
if (!nl_parse_nested(options, police_policy, police_attrs,
ARRAY_SIZE(police_policy))) {
@@ -1395,8 +1395,8 @@ nl_parse_act_police(const struct nlattr *options, struct
tc_flower *flower)
police_tm = police_attrs[TCA_POLICE_TM];
if (police_tm) {
- tm = nl_attr_get_unspec(police_tm, sizeof *tm);
- nl_parse_tcf(tm, flower);
+ memcpy(&tm, nl_attr_get_unspec(police_tm, sizeof tm), sizeof tm);
+ nl_parse_tcf(&tm, flower);
}
return 0;
--
2.34.3
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev