Attention is currently required from: arehbein, daniel, fixeria, jolly, pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35068?usp=email )
Change subject: osmo_io: sendmsg/recvmsg support ......................................................................
Patch Set 10:
(1 comment)
File src/core/osmo_io_poll.c:
https://gerrit.osmocom.org/c/libosmocore/+/35068/comment/19033120_dff70a0e PS10, Line 69: hdr.hdr.msg_control = alloca(iofd->cmsg_size);
why this change? where is hdr. […]
hdr.cmsg is not set at all anywhere in this code path. hdr.cmsg is now a zero-length array at the end of struct iofd_msghdr. If hdr is allocated dynamically on the heap, we can use talloc_zero_size to include the desired cmsg size. Howve, here 'hdr' is on the stack, so we also need to put the cmsg space on the stack which this line above is doing. There is no need to initialzie it, as the cmsg is an *output* parameter from recvmsg to us, and not input data we pass to ot.
iofd_handle_recv() processes the data, and afterwards the data on the stack is released once we exit the scope of this function.