mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-08 12:18:42 +00:00
BSD: Workaround for direct routes on FreeBSD 13.0
FreeBSD 13.0 added some safechecks for syscalls, rejecting sockaddrs that are too small, later versions loosen up the check.
This commit is contained in:
parent
937ebf2536
commit
34ebc4e1ba
@ -190,6 +190,10 @@ static inline void
|
||||
sockaddr_fill_dl(struct sockaddr_dl *sa, struct iface *ifa)
|
||||
{
|
||||
uint len = OFFSETOF(struct sockaddr_dl, sdl_data);
|
||||
|
||||
/* Workaround for FreeBSD 13.0 */
|
||||
len = MAX(len, sizeof(struct sockaddr));
|
||||
|
||||
memset(sa, 0, len);
|
||||
sa->sdl_len = len;
|
||||
sa->sdl_family = AF_LINK;
|
||||
|
Loading…
Reference in New Issue
Block a user