Re: IP_SENDSRCADDR cmsg_len and dnsmasq

2018-08-21 Thread Alexander Bluhm
On Mon, Jul 16, 2018 at 11:11:58AM +0200, Vincent Gross wrote: > I have a regression test for this based on Alexander Markert code + > rework by mpi@, do you want me to commit it right now ? Finally I have commited the fix. Could you take care of the regression test? bluhm

Re: IP_SENDSRCADDR cmsg_len and dnsmasq

2018-07-17 Thread Jeremie Courreges-Anglas
On Mon, Jul 16 2018, Vincent Gross wrote: > On Thu, 12 Jul 2018 19:54:26 +0200 > Alexander Bluhm wrote: > >> >> If it is a temporary problem, that will go away when the content >> of the socket buffer is sent away, we should block or return >> EWOULDBLOCK. For a permanent problem return

Re: IP_SENDSRCADDR cmsg_len and dnsmasq

2018-07-16 Thread Vincent Gross
On Thu, 12 Jul 2018 19:54:26 +0200 Alexander Bluhm wrote: > > If it is a temporary problem, that will go away when the content > of the socket buffer is sent away, we should block or return > EWOULDBLOCK. For a permanent problem return EMSGSIZE. Non atomic > operations can be split in smaller

Re: IP_SENDSRCADDR cmsg_len and dnsmasq

2018-07-12 Thread Alexander Bluhm
On Thu, Jul 12, 2018 at 06:05:14PM +0200, Jeremie Courreges-Anglas wrote: > --8<-- > space = sbspace(so, >so_snd); > if (flags & MSG_OOB) > space += 1024; > if ((atomic && resid > so->so_snd.sb_hiwat) || >

Re: IP_SENDSRCADDR cmsg_len and dnsmasq

2018-07-12 Thread Jeremie Courreges-Anglas
On Wed, Jun 27 2018, Vincent Gross wrote: > So a while back Alexander Markert sent a bug report regarding sendmsg() > behaviour with IP_SENDSRCADDR : > > https://marc.info/?l=openbsd-tech=149276833923905=2 > > This impacts our dnsmasq port : > > https://marc.info/?l=openbsd-tech=149234052220818=2

IP_SENDSRCADDR cmsg_len and dnsmasq

2018-06-27 Thread Vincent Gross
So a while back Alexander Markert sent a bug report regarding sendmsg() behaviour with IP_SENDSRCADDR : https://marc.info/?l=openbsd-tech=149276833923905=2 This impacts our dnsmasq port : https://marc.info/?l=openbsd-tech=149234052220818=2 Alexander Markert shows in the first thread the