UB Sanitizer report:
  controller/pinctrl.c:2945:33: runtime error: load of misaligned address 
0x000002ce5407 for type 'const ovs_be16', which requires 2 byte alignment
  0x000002ce5407: note: pointer points here
   6f 72 67 00 00  01 00 01 00 00 00 00 00  00 03 00 05 00 00 00 00  00 04 00 
10 00 00 00 00  00 00 00
               ^
      #0 0x46d12d in pinctrl_handle_dns_lookup controller/pinctrl.c:2945
      #1 0x46e6fa in process_packet_in controller/pinctrl.c:3186
      [...]

Signed-off-by: Dumitru Ceara <[email protected]>
---
 controller/pinctrl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/controller/pinctrl.c b/controller/pinctrl.c
index 373ed6cb2..fc8c2113b 100644
--- a/controller/pinctrl.c
+++ b/controller/pinctrl.c
@@ -2932,7 +2932,7 @@ pinctrl_handle_dns_lookup(
         goto exit;
     }
 
-    uint16_t query_type = ntohs(*ALIGNED_CAST(const ovs_be16 *, in_dns_data));
+    uint16_t query_type = ntohs(get_unaligned_be16((void *) in_dns_data));
     /* Supported query types - A, AAAA, ANY and PTR */
     if (!(query_type == DNS_QUERY_TYPE_A || query_type == DNS_QUERY_TYPE_AAAA
           || query_type == DNS_QUERY_TYPE_ANY

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to