]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BSD: Fix alignment issue
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Mon, 4 Sep 2017 20:32:45 +0000 (22:32 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Mon, 4 Sep 2017 20:32:45 +0000 (22:32 +0200)
Incorrect structure alignment breaks kernel routing table updates on
FreeBSD/ARM (and perhaps other platforms).

Thanks to Eugene Sevastyanov for the original patch.

sysdep/bsd/krt-sock.c

index 9c9df51de527ba0191ff88ebeaee993fa99618e7..f0cebd11c5b7566d554c166630e6b3a41d289d17 100644 (file)
@@ -168,7 +168,7 @@ struct ks_msg
 {
   struct rt_msghdr rtm;
   struct sockaddr_storage buf[RTAX_MAX];
-};
+} PACKED;
 
 #define ROUNDUP(a) \
         ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))