process parses af from the sockaddrs.
ok patrick@
-/* $OpenBSD: vroute.c,v 1.1 2021/02/13 16:14:12 tobhe Exp $ */
+/* $OpenBSD: vroute.c,v 1.2 2021/02/21 14:21:37 tobhe Exp $ */
/*
* Copyright (c) 2021 Tobias Heider <tobhe@openbsd.org>
return (-1);
af = dst->sa_family;
- iov[iovcnt].iov_base = ⁡
- iov[iovcnt].iov_len = sizeof(af);
- iovcnt++;
-
iov[iovcnt].iov_base = &rdomain;
iov[iovcnt].iov_len = sizeof(rdomain);
iovcnt++;
size_t left;
int addrs = 0;
int type, flags;
- uint8_t af, rdomain;
+ uint8_t rdomain;
ptr = (uint8_t *)imsg->data;
left = IMSG_DATA_SIZE(imsg);
- if (left < sizeof(af))
- return (-1);
- af = *ptr;
- ptr += sizeof(af);
- left -= sizeof(af);
-
if (left < sizeof(rdomain))
return (-1);
rdomain = *ptr;