diff options
author | Maria Matejka <mq@ucw.cz> | 2023-01-21 23:49:52 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-01-21 23:49:52 +0100 |
commit | 21c4c8eafb7125375b2e562cc0e7e9d52bbb1aaf (patch) | |
tree | 22ddac5513f6495334666e7af2aa218640a1afb1 /sysdep/bsd | |
parent | 2f764c87ff3c8a8af6d3bc043b439276ba2b0a79 (diff) | |
parent | 1e47b9f203aaaad0fb658d40a1670f1d0437f1f8 (diff) |
Merge commit '1e47b9f203aaaad0fb658d40a1670f1d0437f1f8' into thread-next
Diffstat (limited to 'sysdep/bsd')
-rw-r--r-- | sysdep/bsd/krt-sock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 0706f546..fcf9ac4d 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -193,6 +193,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; |