SO_REUSEADDR for dhcp listener - goog idea?

Kamil Jońca kjonca at o2.pl
Thu Jul 12 20:06:45 CEST 2018


Recently strongswan folks changed behavior of charon regarding dhcp.

https://lists.strongswan.org/pipermail//dev/2018-June/001918.html

side effect is, that freeradius refuses to start when charon is
working.

According to link SO_REUSEADDR on dhcp server socket should be enough,
I roughly tested it (shamelessly copy

#v+
{
		int on = 1;
		
		if (setsockopt(this->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) {
			close(this->fd);
			ERROR("Failed to reuse address: %s", fr_syserror(errno));
			return -1;
		}
	}
#v-

in listen.c )

and it seem to work, although is rather ugly solution.

I do not know if strongswan people are right but if so, maybe it would
be good idea to put SO_REUSEADDR for dhcp listener?
KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/
DYSLEXICS OF THE WORLD, UNTIE!


More information about the Freeradius-Users mailing list