socket-util: tighten aignment check for CMSG_TYPED_DATA()
authorLennart Poettering <lennart@poettering.net>
Thu, 13 Apr 2023 08:21:31 +0000 (10:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 13 Apr 2023 08:21:31 +0000 (10:21 +0200)
commit79dec6f5cc0b72d43dfb0469fa68b5cd023fbaf9
tree4fe1052bdd3b12837ee0bd9f942c3a4ae9e8dbd9
parent39857544ee3794481f165e6ecc5d5a81c65f0ee9
socket-util: tighten aignment check for CMSG_TYPED_DATA()

Apparently CMSG_DATA() alignment is very much undefined. Which is quite
an ABI fuck-up, but we need to deal with this. CMSG_TYPED_DATA() already
checks alignment of the specified pointer. Let's also check matching
alignment of the underlying structures, which we already can do at
compile-time.

See: #27241

(This does not fix #27241, but should catch such errors already at
compile-time instead of runtime)
src/basic/socket-util.h