]> git.puffer.fish Git - mirror/frr.git/commit
lib: add sockopt helper for setting IPV6_V6ONLY and use it
authorDavid Lamparter <equinox@diac24.net>
Sun, 4 Oct 2009 14:21:49 +0000 (16:21 +0200)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 21 Nov 2011 14:25:01 +0000 (18:25 +0400)
commit7d3d2de4657a080275a705fbf3bd21a484cb3e4b
tree2ba84d4f69310037ce27f7c3df199dab5cf0f47a
parentdaca2cf463496e5844812ea13a4fafefafe4853f
lib: add sockopt helper for setting IPV6_V6ONLY and use it

getaddrinfo returns a list of socket parameters for listening. it
will contain both IPv4 and IPv6 listening sockets. unless we use
IPV6_V6ONLY on the IPv6 ones, only the socket listed first will
work. if the IPv4 one came first, the IPv6 one would get an
"Address in use" error.

this functionality was already present for bgpd and its listening
sockets. as it is needed for vtys as well, make it a common helper.
bgpd/bgp_network.c
lib/sockunion.c
lib/sockunion.h
lib/vty.c