]> 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>
Tue, 13 Dec 2011 15:23:38 +0000 (19:23 +0400)
commitca0512692156d5bbb902523d2f123fc89dbec1ab
tree6dd0206cb175c3e790023f9e5d5d755b57181b0d
parente0ca5fde7be5b5ce90dae78c2477e8245aecb8e9
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.

Conflicts:

lib/sockunion.c
bgpd/bgp_network.c
lib/sockunion.c
lib/sockunion.h
lib/vty.c