From 46901400a3401a4a6caa40435241b4546bb2a5c5 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 10 Dec 2009 17:19:09 +0000 Subject: vty_serv_sock_family unused If the vty_serv_sock_addrinfo is being used, then vty_serv_sock_family is unsed. Fix by adjusting ifdef/else/endif --- lib/vty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/vty.c') diff --git a/lib/vty.c b/lib/vty.c index bd1dbac0..6b66a4da 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -1839,7 +1839,7 @@ vty_serv_sock_addrinfo (const char *hostname, unsigned short port) freeaddrinfo (ainfo_save); } -#endif /* HAVE_IPV6 && ! NRL */ +#else /* HAVE_IPV6 && ! NRL */ /* Make vty server socket. */ static void @@ -1905,6 +1905,7 @@ vty_serv_sock_family (const char* addr, unsigned short port, int family) /* Add vty server event. */ vty_event (VTY_SERV, accept_sock, NULL); } +#endif /* HAVE_IPV6 && ! NRL */ #ifdef VTYSH /* For sockaddr_un. */ -- cgit v1.2.1 From ca0512692156d5bbb902523d2f123fc89dbec1ab Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sun, 4 Oct 2009 16:21:49 +0200 Subject: 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 --- lib/vty.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/vty.c') diff --git a/lib/vty.c b/lib/vty.c index 6b66a4da..d9eb921e 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -1816,6 +1816,7 @@ vty_serv_sock_addrinfo (const char *hostname, unsigned short port) if (sock < 0) continue; + sockopt_v6only (ainfo->ai_family, sock); sockopt_reuseaddr (sock); sockopt_reuseport (sock); -- cgit v1.2.1 From 9206f9ecd5526778bf449bbb12f056d681d3b040 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Sun, 18 Dec 2011 19:43:40 +0400 Subject: fix set never used warnings (This patch was modified to leave calls to stream_getl() in place, they are necessary for the stream's internal pointer to advance to the correct position. -- Denis) Signed-off-by: Denis Ovsienko Fix gcc warnings about varables that are set but never used. * bgpd/bgp_attr.c * cluster_unintern(): ret * transit_unintern(): ret * bgp_attr_default_intern(): attre * bgp_mp_reach_parse(): rd_high, rd_low * bgpd/bgp_route.c * bgp_announce_check_rsclient(): bgp * bgpd/bgp_zebra.c * zebra_read_ipv4(): ifindex * zebra_read_ipv6(): ifindex * bgpd/bgpd.c * bgp_config_write_peer(): filter * lib/distribute.c * distribute_list_all(): dist * distribute_list(): dist * distribute_list_prefix_all(): dist * distribute_list_prefix(): dist * lib/if_rmap.c * if_rmap(): if_rmap * lib/vty.c * vty_accept(): vty * lib/zclient.c * zclient_read(): ret * zebra/irdp_interface.c * if_group(): zi * zebra/rt_netlink.c * kernel_read(): ret, sock --- lib/vty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/vty.c') diff --git a/lib/vty.c b/lib/vty.c index d9eb921e..83bd6785 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -1685,7 +1685,6 @@ static int vty_accept (struct thread *thread) { int vty_sock; - struct vty *vty; union sockunion su; int ret; unsigned int on; @@ -1770,7 +1769,7 @@ vty_accept (struct thread *thread) if (bufp) XFREE (MTYPE_TMP, bufp); - vty = vty_create (vty_sock, &su); + vty_create (vty_sock, &su); return 0; } -- cgit v1.2.1 From 5734509c0545ebd95a5b8e3f22a911c1a39ffa1b Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Sun, 25 Dec 2011 17:52:09 +0100 Subject: babeld: Initial import, for Babel routing protocol. * Initial import of the Babel routing protocol, ported to Quagga. * LICENCE: Update the original LICENCE file to include all known potentially applicable copyright claims. Ask that any future contributors to babeld/ grant MIT/X11 licence to their work. * *.{c,h}: Add GPL headers, in according with the SFLC guidance on dealing with potentially mixed GPL/other licensed work, at: https://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html --- lib/vty.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/vty.c') diff --git a/lib/vty.c b/lib/vty.c index 83bd6785..9a4efe64 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -699,6 +699,7 @@ vty_end_config (struct vty *vty) case ZEBRA_NODE: case RIP_NODE: case RIPNG_NODE: + case BABEL_NODE: case BGP_NODE: case BGP_VPNV4_NODE: case BGP_IPV4_NODE: @@ -1107,6 +1108,7 @@ vty_stop_input (struct vty *vty) case ZEBRA_NODE: case RIP_NODE: case RIPNG_NODE: + case BABEL_NODE: case BGP_NODE: case RMAP_NODE: case OSPF_NODE: -- cgit v1.2.1