summaryrefslogtreecommitdiffhomepage
path: root/src/uapi.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-01-10 05:52:06 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-01-10 06:29:24 +0100
commit5685eb8ddb89fa0e5b117ef0f892b6783fdcefb4 (patch)
tree5df56b5397d082ef925e16b832780efe26d027b5 /src/uapi.h
parent7fcdda0253306475b5abc9318c1cff7022873d69 (diff)
uapi: use sockaddr union instead of sockaddr_storage
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/uapi.h')
-rw-r--r--src/uapi.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/uapi.h b/src/uapi.h
index e5d7368..df45c96 100644
--- a/src/uapi.h
+++ b/src/uapi.h
@@ -105,7 +105,11 @@ struct wgpeer {
__u8 public_key[WG_KEY_LEN]; /* Get/Set */
__u32 flags; /* Set */
- struct sockaddr_storage endpoint; /* Get/Set */
+ union {
+ struct sockaddr addr;
+ struct sockaddr_in addr4;
+ struct sockaddr_in6 addr6;
+ } endpoint; /* Get/Set */
struct timeval last_handshake_time; /* Get */
__u64 rx_bytes, tx_bytes; /* Get */