diff options
author | Tobias Heider <tobhe@cvs.openbsd.org> | 2022-03-16 18:17:21 +0000 |
---|---|---|
committer | Tobias Heider <tobhe@cvs.openbsd.org> | 2022-03-16 18:17:21 +0000 |
commit | 229e9428f0ea7ac06a3778e21f2a357557f8c9fa (patch) | |
tree | 1115b93be5bfdf0b50b844b7ba2455a602606ac9 /sbin/iked | |
parent | dce762d7f9f42d4fffdfece21e7b56e5d750ec13 (diff) |
Make sure contents of vroute messages are aligned properly.
Fixes address autoconfiguration on octeon.
Found by and ok mbuhl@
Diffstat (limited to 'sbin/iked')
-rw-r--r-- | sbin/iked/vroute.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/iked/vroute.c b/sbin/iked/vroute.c index d34f5de5ea2..328b0be7976 100644 --- a/sbin/iked/vroute.c +++ b/sbin/iked/vroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vroute.c,v 1.15 2021/12/01 16:42:13 deraadt Exp $ */ +/* $OpenBSD: vroute.c,v 1.16 2022/03/16 18:17:20 tobhe Exp $ */ /* * Copyright (c) 2021 Tobias Heider <tobhe@openbsd.org> @@ -40,7 +40,7 @@ #define ROUNDUP(a) (a>0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) -int vroute_setroute(struct iked *, uint8_t, struct sockaddr *, uint8_t, +int vroute_setroute(struct iked *, uint32_t, struct sockaddr *, uint8_t, struct sockaddr *, int); int vroute_doroute(struct iked *, int, int, int, uint8_t, struct sockaddr *, struct sockaddr *, struct sockaddr *, int *); @@ -509,7 +509,7 @@ vroute_setdelroute(struct iked *env, uint8_t rdomain, struct sockaddr *dst, } int -vroute_setroute(struct iked *env, uint8_t rdomain, struct sockaddr *dst, +vroute_setroute(struct iked *env, uint32_t rdomain, struct sockaddr *dst, uint8_t mask, struct sockaddr *addr, int type) { struct sockaddr_storage sa; @@ -571,7 +571,7 @@ vroute_getroute(struct iked *env, struct imsg *imsg) size_t left; int addrs = 0; int type, flags; - uint8_t rdomain; + uint32_t rdomain; ptr = (uint8_t *)imsg->data; left = IMSG_DATA_SIZE(imsg); @@ -643,7 +643,7 @@ vroute_getcloneroute(struct iked *env, struct imsg *imsg) struct sockaddr_storage addr; uint8_t *ptr; size_t left; - uint8_t rdomain; + uint32_t rdomain; int flags; int addrs; int need_gw; |