Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/stable/2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldsharp committed Feb 2, 2017
2 parents b384af4 + 56041a7 commit 1a35e2e
Show file tree
Hide file tree
Showing 95 changed files with 1,503 additions and 393 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,10 @@ cscope.*
*.pb.h
*.pb-c.h
*.pb-c.c
TAGS
tags
GTAGS
GSYMS
GRTAGS
GPATH

4 changes: 2 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ChangeLog information for Quagga is now recorded in our source-code
ChangeLog information for FreeRangeRouting is for now recorded in source-code
management system. Please see:

http://www.quagga.net/devel.php
http://www.freerangerouting.org/
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
SUBDIRS = lib qpb fpm @ZEBRA@ @LIBRFP@ @RFPTEST@ \
@BGPD@ @RIPD@ @RIPNGD@ @OSPFD@ @OSPF6D@ @LDPD@ \
@ISISD@ @PIMD@ @WATCHFRR@ @VTYSH@ @OSPFCLIENT@ @DOC@ m4 @pkgsrcdir@ \
redhat @SOLARIS@ tests tools cumulus
redhat @SOLARIS@ tests tools cumulus snapcraft

DIST_SUBDIRS = lib qpb fpm zebra bgpd ripd ripngd ospfd ospf6d ldpd \
isisd watchfrr vtysh ospfclient doc m4 pkgsrc redhat tests \
solaris pimd @LIBRFP@ @RFPTEST@ tools cumulus
solaris pimd @LIBRFP@ @RFPTEST@ tools cumulus snapcraft

EXTRA_DIST = aclocal.m4 SERVICES REPORTING-BUGS \
update-autotools \
Expand Down
17 changes: 9 additions & 8 deletions REPORTING-BUGS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This file describes the procedure for reporting Quagga bugs. You are not
obliged to follow this format, but it would be great help for Quagga developers
This file describes the procedure for reporting FreeRangeRouting bugs. You are not
obliged to follow this format, but it would be great help for FreeRangeRouting developers
if you report a bug as described below.

Bugs submitted with woefully incomplete information may be summarily
Expand All @@ -9,23 +9,24 @@ additional information. Bugs may be closed after 30 days of
non-response to requests to reconfirm or supply additional
information.

Report bugs http://bugzilla.quagga.net
Report bugs on Github Issue Tracker at
https://github.com/freerangerouting/frr/issues

Please supply the following information:
1. Your Quagga version or if it is from git then the commit reference.
1. Your FreeRangeRouting version or if it is from git then the commit reference.
Please try to report bugs against git master or the latest release.
2. Quagga daemons you run e.g. bgpd or ripd and full name of your OS. Any
2. FRR daemons you run e.g. bgpd or ripd and full name of your OS. Any
specific options you compiled Quagga with.
3. Problem description. Copy and paste relative commands and their output to
describe your network setup e.g. "zebra>show ip route".
Please, also give your simple network layout and output of relative OS
commands (e.g., ifconfig (BSD) or ip (Linux)).
4. All Quagga configuration files you use. If you don't want to publish your
4. All FRR configuration files you use. If you don't want to publish your
network numbers change 2 middle bytes in IPv4 address to be XXX (e.g.
192.XXX.XXX.32/24). Similar could be done with IPv6.
5. If any Quagga daemon core dumped, please, supply stack trace using the
5. If any FRR daemon core dumped, please, supply stack trace using the
following commands: host> gdb exec_file core_file , (gdb) bt .
6. Run all Quagga daemons with full debugging on (see documentation on
6. Run all FRR daemons with full debugging on (see documentation on
debugging) and send _only_ part of logs which are relative to your problem.
7. If the problem is difficult to reproduce please send a shell script to
reproduce it.
Expand Down
11 changes: 7 additions & 4 deletions bgpd/bgp_bfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ bgp_bfd_deregister_peer (struct peer *peer)
if (!CHECK_FLAG(bfd_info->flags, BFD_FLAG_BFD_REG))
return;

bfd_info->status = BFD_STATUS_DOWN;
bfd_info->last_update = bgp_clock();

bgp_bfd_peer_sendmsg(peer, ZEBRA_BFD_DEST_DEREGISTER);
}

Expand Down Expand Up @@ -311,14 +314,14 @@ bgp_bfd_dest_update (int command, struct zclient *zclient,
prefix2str(&dp, buf[0], sizeof(buf[0]));
if (ifp)
{
zlog_debug("Zebra: interface %s bfd destination %s %s",
ifp->name, buf[0], bfd_get_status_str(status));
zlog_debug("Zebra: vrf %d interface %s bfd destination %s %s",
vrf_id, ifp->name, buf[0], bfd_get_status_str(status));
}
else
{
prefix2str(&sp, buf[1], sizeof(buf[1]));
zlog_debug("Zebra: source %s bfd destination %s %s",
buf[1], buf[0], bfd_get_status_str(status));
zlog_debug("Zebra: vrf %d source %s bfd destination %s %s",
vrf_id, buf[1], buf[0], bfd_get_status_str(status));
}
}

Expand Down
12 changes: 8 additions & 4 deletions bgpd/bgp_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct bgp_dump
struct thread *t_interval;
};

static int bgp_dump_unset (struct vty *vty, struct bgp_dump *bgp_dump);
static int bgp_dump_unset (struct bgp_dump *bgp_dump);
static int bgp_dump_interval_func (struct thread *);

/* BGP packet dump output buffer. */
Expand Down Expand Up @@ -657,7 +657,7 @@ bgp_dump_set (struct vty *vty, struct bgp_dump *bgp_dump,
}

/* Removing previous config */
bgp_dump_unset(vty, bgp_dump);
bgp_dump_unset(bgp_dump);

if (interval_str)
{
Expand Down Expand Up @@ -696,7 +696,7 @@ bgp_dump_set (struct vty *vty, struct bgp_dump *bgp_dump,
}

static int
bgp_dump_unset (struct vty *vty, struct bgp_dump *bgp_dump)
bgp_dump_unset (struct bgp_dump *bgp_dump)
{
/* Removing file name. */
if (bgp_dump->filename)
Expand Down Expand Up @@ -817,7 +817,7 @@ DEFUN (no_dump_bgp_all,
break;
}

return bgp_dump_unset (vty, bgp_dump_struct);
return bgp_dump_unset (bgp_dump_struct);
}

/* BGP node structure. */
Expand Down Expand Up @@ -919,6 +919,10 @@ bgp_dump_init (void)
void
bgp_dump_finish (void)
{
bgp_dump_unset (&bgp_dump_all);
bgp_dump_unset (&bgp_dump_updates);
bgp_dump_unset (&bgp_dump_routes);

stream_free (bgp_dump_obuf);
bgp_dump_obuf = NULL;
}
17 changes: 15 additions & 2 deletions bgpd/bgp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "queue.h"
#include "vrf.h"
#include "bfd.h"
#include "sockopt.h"

#include "bgpd/bgpd.h"
#include "bgpd/bgp_attr.h"
Expand All @@ -60,6 +61,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#endif

/* bgpd options, we use GNU getopt library. */
#define OPTION_VTYSOCK 1000
static const struct option longopts[] =
{
{ "daemon", no_argument, NULL, 'd'},
Expand All @@ -70,6 +72,7 @@ static const struct option longopts[] =
{ "listenon", required_argument, NULL, 'l'},
{ "vty_addr", required_argument, NULL, 'A'},
{ "vty_port", required_argument, NULL, 'P'},
{ "vty_socket", required_argument, NULL, OPTION_VTYSOCK },
{ "retain", no_argument, NULL, 'r'},
{ "no_kernel", no_argument, NULL, 'n'},
{ "user", required_argument, NULL, 'u'},
Expand Down Expand Up @@ -112,6 +115,9 @@ static struct quagga_signal_t bgp_signals[] =
/* Configuration file and directory. */
char config_default[] = SYSCONFDIR BGP_DEFAULT_CONFIG;

/* VTY Socket prefix */
char vty_sock_path[MAXPATHLEN] = BGP_VTYSH_PATH;

/* Route retain mode flag. */
static int retain_mode = 0;

Expand All @@ -124,6 +130,7 @@ static const char *pid_file = PATH_BGPD_PID;
/* VTY port number and address. */
int vty_port = BGP_VTY_PORT;
char *vty_addr = NULL;
char *vty_sock_name;

/* privileges */
static zebra_capabilities_t _caps_p [] =
Expand Down Expand Up @@ -166,6 +173,7 @@ redistribution between different routing protocols.\n\n\
-l, --listenon Listen on specified address (implies -n)\n\
-A, --vty_addr Set vty's bind address\n\
-P, --vty_port Set vty's port number\n\
--vty_socket Override vty socket path\n\
-r, --retain When program terminates, retain added route by bgpd.\n\
-n, --no_kernel Do not install route to kernel.\n\
-u, --user User to run as\n\
Expand Down Expand Up @@ -196,7 +204,7 @@ sighup (void)
vty_read_config (config_file, config_default);

/* Create VTY's socket */
vty_serv_sock (vty_addr, vty_port, BGP_VTYSH_PATH);
vty_serv_sock (vty_addr, vty_port, vty_sock_path);

/* Try to return to normal operation. */
}
Expand Down Expand Up @@ -303,6 +311,8 @@ bgp_exit (int status)
if (zlog_default)
closezlog (zlog_default);

memset (bm, 0, sizeof (*bm));

if (bgp_debug_count())
log_memstats_stderr ("bgpd");
exit (status);
Expand Down Expand Up @@ -470,6 +480,9 @@ main (int argc, char **argv)
if (vty_port <= 0 || vty_port > 0xffff)
vty_port = BGP_VTY_PORT;
break;
case OPTION_VTYSOCK:
set_socket_path(vty_sock_path, BGP_VTYSH_PATH, optarg, sizeof (vty_sock_path));
break;
case 'r':
retain_mode = 1;
break;
Expand Down Expand Up @@ -545,7 +558,7 @@ main (int argc, char **argv)
pid_output (pid_file);

/* Make bgp vty socket. */
vty_serv_sock (vty_addr, vty_port, BGP_VTYSH_PATH);
vty_serv_sock (vty_addr, vty_port, vty_sock_path);

/* Print banner. */
zlog_notice ("BGPd %s starting: vty@%d, bgp@%s:%d", FRR_COPYRIGHT,
Expand Down
22 changes: 20 additions & 2 deletions bgpd/bgp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -4271,6 +4271,7 @@ peer_update_source_vty (struct vty *vty, const char *peer_str,
const char *source_str)
{
struct peer *peer;
struct prefix p;

peer = peer_and_group_lookup_vty (vty, peer_str);
if (! peer)
Expand All @@ -4287,7 +4288,16 @@ peer_update_source_vty (struct vty *vty, const char *peer_str,
if (ret == 0)
peer_update_source_addr_set (peer, &su);
else
peer_update_source_if_set (peer, source_str);
{
if (str2prefix (source_str, &p))
{
vty_out (vty, "%% Invalid update-source, remove prefix length %s",
VTY_NEWLINE);
return CMD_WARNING;
}
else
peer_update_source_if_set (peer, source_str);
}
}
else
peer_update_source_unset (peer);
Expand Down Expand Up @@ -8217,11 +8227,19 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
tm = gmtime(&uptime);
json_object_int_add(json_neigh, "lastResetTimerMsecs", (tm->tm_sec * 1000) + (tm->tm_min * 60000) + (tm->tm_hour * 3600000));
json_object_string_add(json_neigh, "lastResetDueTo", peer_down_str[(int) p->last_reset]);
if (p->last_reset_cause_size)
if (p->last_reset == PEER_DOWN_NOTIFY_SEND ||
p->last_reset == PEER_DOWN_NOTIFY_RECEIVED)
{
char errorcodesubcode_hexstr[5];
char errorcodesubcode_str[256];

code_str = bgp_notify_code_str(p->notify.code);
subcode_str = bgp_notify_subcode_str(p->notify.code, p->notify.subcode);

sprintf(errorcodesubcode_hexstr, "%02X%02X", p->notify.code, p->notify.subcode);
json_object_string_add(json_neigh, "lastErrorCodeSubcode", errorcodesubcode_hexstr);
snprintf(errorcodesubcode_str, 255, "%s%s", code_str, subcode_str);
json_object_string_add(json_neigh, "lastNotificationReason", errorcodesubcode_str);
}
}
else
Expand Down
17 changes: 9 additions & 8 deletions bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -6723,26 +6723,27 @@ bgp_config_write_peer_global (struct vty *vty, struct bgp *bgp,
}

/* advertisement-interval */
if (CHECK_FLAG (peer->config, PEER_CONFIG_ROUTEADV)
&& peer->v_routeadv != BGP_DEFAULT_EBGP_ROUTEADV
&& ! peer_group_active (peer))
if (CHECK_FLAG (peer->config, PEER_CONFIG_ROUTEADV) &&
((! peer_group_active (peer) && peer->v_routeadv != BGP_DEFAULT_EBGP_ROUTEADV) ||
(peer_group_active (peer) && peer->v_routeadv != g_peer->v_routeadv)))
{
vty_out (vty, " neighbor %s advertisement-interval %d%s",
addr, peer->v_routeadv, VTY_NEWLINE);
}

/* timers */
if (CHECK_FLAG (peer->config, PEER_CONFIG_TIMER)
&& (peer->keepalive != BGP_DEFAULT_KEEPALIVE || peer->holdtime != BGP_DEFAULT_HOLDTIME)
&& ! peer_group_active (peer))
if (CHECK_FLAG (peer->config, PEER_CONFIG_TIMER) &&
((! peer_group_active (peer) && (peer->keepalive != BGP_DEFAULT_KEEPALIVE || peer->holdtime != BGP_DEFAULT_HOLDTIME)) ||
(peer_group_active (peer) && (peer->keepalive != g_peer->keepalive || peer->holdtime != g_peer->holdtime))))
{
vty_out (vty, " neighbor %s timers %d %d%s", addr,
peer->keepalive, peer->holdtime, VTY_NEWLINE);
}

if (CHECK_FLAG (peer->config, PEER_CONFIG_CONNECT) &&
peer->connect != BGP_DEFAULT_CONNECT_RETRY &&
! peer_group_active (peer))
((! peer_group_active (peer) && peer->connect != BGP_DEFAULT_CONNECT_RETRY) ||
(peer_group_active (peer) && peer->connect != g_peer->connect)))

{
vty_out (vty, " neighbor %s timers connect %d%s", addr,
peer->connect, VTY_NEWLINE);
Expand Down
4 changes: 2 additions & 2 deletions buildtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# builds some git commit of Quagga in some different configurations
# usage: buildtest.sh [commit [configurations...]]

basecfg="--prefix=/usr --enable-user=quagga --enable-group=quagga --enable-vty-group=quagga --enable-configfile-mask=0660 --enable-logfile-mask=0640 --enable-vtysh --sysconfdir=/etc/quagga --enable-exampledir=/etc/quagga/samples --localstatedir=/var/run/quagga --libdir=/usr/lib64/quagga --enable-rtadv --disable-static --enable-isisd --enable-multipath=0 --enable-pimd --enable-werror"
basecfg="--prefix=/usr --enable-user=frr --enable-group=frr --enable-vty-group=frr --enable-configfile-mask=0660 --enable-logfile-mask=0640 --enable-vtysh --sysconfdir=/etc/frr --enable-exampledir=/etc/frr/samples --localstatedir=/var/run/frr --libdir=/usr/lib64/frr --enable-rtadv --disable-static --enable-isisd --enable-multipath=0 --enable-pimd --enable-werror"

configs_base="gcc|$basecfg"

Expand Down Expand Up @@ -36,7 +36,7 @@ trap errfunc ERR

COMMITREF="$1"
COMMITISH="`git rev-list --max-count=1 ${COMMITREF:-HEAD}`"
TEMP="`mktemp -t -d quaggabuild.XXXXXX`"
TEMP="`mktemp -t -d frrbuild.XXXXXX`"
BASE="`pwd`"
CONFIGS="$2"

Expand Down
4 changes: 2 additions & 2 deletions common.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ Q_PROTOBUF_SRCS = $(Q_PROTOBUF_CFILES) $(Q_PROTOBUF_HFILES)
#
# Information about how to link to various libraries.
#
Q_QUAGGA_PB_CLIENT_LDOPTS = $(top_srcdir)/qpb/libquagga_pb.la $(Q_PROTOBUF_C_CLIENT_LDOPTS)
Q_FRR_PB_CLIENT_LDOPTS = $(top_srcdir)/qpb/libfrr_pb.la $(Q_PROTOBUF_C_CLIENT_LDOPTS)

Q_FPM_PB_CLIENT_LDOPTS = $(top_srcdir)/fpm/libfpm_pb.la $(Q_QUAGGA_PB_CLIENT_LDOPTS)
Q_FPM_PB_CLIENT_LDOPTS = $(top_srcdir)/fpm/libfpm_pb.la $(Q_FRR_PB_CLIENT_LDOPTS)

endif # HAVE_PROTOBUF

Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ dnl -----------------------------------
if test "x${EXTRAVERSION}" != "x" ; then
VERSION="${VERSION}${EXTRAVERSION}"
PACKAGE_VERSION="${PACKAGE_VERSION}${EXTRAVERSION}"
AC_SUBST(PACKAGE_EXTRAVERSION, ["${EXTRAVERSION}"])
PACKAGE_STRING="${PACKAGE_STRING}${EXTRAVERSION}"
fi

Expand Down Expand Up @@ -1694,6 +1695,8 @@ AC_CONFIG_FILES([Makefile lib/Makefile qpb/Makefile zebra/Makefile ripd/Makefile
pkgsrc/Makefile
fpm/Makefile
redhat/frr.spec
snapcraft/Makefile
snapcraft/snapcraft.yaml
lib/version.h
doc/defines.texi
doc/bgpd.8
Expand Down
Loading

0 comments on commit 1a35e2e

Please sign in to comment.