From: tobhe Date: Wed, 16 Mar 2022 18:17:20 +0000 (+0000) Subject: Make sure contents of vroute messages are aligned properly. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8429d6e9ce5c724c187e435babcd58278f6d54a8;p=openbsd Make sure contents of vroute messages are aligned properly. Fixes address autoconfiguration on octeon. Found by and ok mbuhl@ --- 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 @@ -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;