On Dienstag, 24. Januar 2017 15:35:33 CET Jonathan Haws wrote: [...]
This doesn't seem to belong in this patch.
Yes, that is correct. I must have fixed that formatting when I was going through everything else. Would you like me to take it out of this patch?
- interface->netsock = sock;
- interface->netsock_mcast = sock_mc;
- return 0;
- return -1;
You only close sock_mc on errors but not sock?
And please chose something better  than err4.
I see why you'd want me to rename the goto - however it was chosen to differentiate between the err goto in netsock_open. I called it err4 since it is for the netsock_open4() function dealing with IPv4. Would err_ipv4 be better?
How about "err_close_sock" and "err_close_sockmc" or something like that? You will need two different ones and these describe what will be done on errors.
Kind regards, Sven