wireguard: Fix struct sockaddr usage
wg_dns_reresolve_cb() tries to read 16 bytes from the addr variable in
case of IPv6 but struct sockaddr has size of 8 bytes. Introduce a
helper struct containing IPv4 and IPv6 sockaddr as superset of all IP
based sockaddr.
This helper struct is identically to the 'union endpoint' in
wireguard.h. But we don't want to touch this header file as it is 100%
copy from the upstream WireGuard project.
Fixes:
90592f7a5835 ("wireguard: Regular reresolve endpoint address")
Change-Id: I2b262e61e52c795ab0cab4b206bd25df8ae57738
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>