diff options
| -rw-r--r-- | COMMUNITY.md | 6 | ||||
| -rw-r--r-- | bgpd/bgpd.c | 9 | ||||
| -rw-r--r-- | bgpd/rfapi/bgp_rfapi_cfg.c | 2 | ||||
| -rwxr-xr-x | configure.ac | 2 | ||||
| -rw-r--r-- | debian/control | 2 | ||||
| -rw-r--r-- | debian/frr.postinst | 1 | ||||
| -rw-r--r-- | lib/agentx.c | 7 | ||||
| -rw-r--r-- | tools/etc/sudoers.d/frr_sudoers | 15 | ||||
| -rw-r--r-- | vtysh/Makefile.am | 4 | ||||
| -rwxr-xr-x | vtysh/extract.pl.in | 3 | ||||
| -rw-r--r-- | vtysh/vtysh_config.c | 1 |
11 files changed, 29 insertions, 23 deletions
diff --git a/COMMUNITY.md b/COMMUNITY.md index 704c47a95e..0eeb93403e 100644 --- a/COMMUNITY.md +++ b/COMMUNITY.md @@ -132,6 +132,12 @@ Linux Foundation website](http://www.linuxfoundation.org/content/how-participate-linux-community-0) to be a helpful resource. +### Code submission - What do I submit my changes against? + +We've documented where we would like to have the different fixes applied at +https://github.com/FRRouting/frr/wiki/Where-Do-I-create-a-Pull-Request-against%3F +If you are unsure where your submission goes, look at that document or ask +the question of a maintainer. ### Code submission - Github Pull Request (Strongly Preferred) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index f14d6f6862..20013bc005 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -2955,9 +2955,12 @@ bgp_create (as_t *as, const char *name, enum bgp_instance_type inst_type) bgp->as = *as; #if ENABLE_BGP_VNC - bgp->rfapi = bgp_rfapi_new(bgp); - assert(bgp->rfapi); - assert(bgp->rfapi_cfg); + if (inst_type != BGP_INSTANCE_TYPE_VRF) + { + bgp->rfapi = bgp_rfapi_new(bgp); + assert(bgp->rfapi); + assert(bgp->rfapi_cfg); + } #endif /* ENABLE_BGP_VNC */ if (name) diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c index 5ddccc906f..4f46565900 100644 --- a/bgpd/rfapi/bgp_rfapi_cfg.c +++ b/bgpd/rfapi/bgp_rfapi_cfg.c @@ -4281,6 +4281,8 @@ bgp_rfapi_cfg_write (struct vty *vty, struct bgp *bgp) int write = 0; afi_t afi; int type; + if (bgp->rfapi == NULL || hc == NULL) + return write; vty_out (vty, "!%s", VTY_NEWLINE); for (ALL_LIST_ELEMENTS (hc->nve_groups_sequential, node, nnode, rfg)) diff --git a/configure.ac b/configure.ac index 919902d938..340b0a953b 100755 --- a/configure.ac +++ b/configure.ac @@ -1510,6 +1510,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]) +AM_CONDITIONAL(SNMP, test "x$SNMP_METHOD" = "xagentx") + dnl --------------------------- dnl sockaddr and netinet checks dnl --------------------------- diff --git a/debian/control b/debian/control index 4ecbefc6d6..3982aa41be 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Package: frr Architecture: any Depends: ${shlibs:Depends}, logrotate (>= 3.2-11), iproute, ${misc:Depends}, libc-ares2 Pre-Depends: adduser -Conflicts: zebra, zebra-pj +Conflicts: zebra, zebra-pj, quagga Replaces: zebra, zebra-pj Suggests: snmpd Description: BGP/OSPF/RIP routing daemon diff --git a/debian/frr.postinst b/debian/frr.postinst index 43d3ffa9e0..9020d7bf7a 100644 --- a/debian/frr.postinst +++ b/debian/frr.postinst @@ -15,7 +15,6 @@ frrvtygid=`egrep "^frrvty:" $GROUPFILE | awk -F ":" '{ print $3 }'` chown -R ${frruid}:${frrgid} /etc/frr touch /etc/frr/vtysh.conf chgrp ${frrvtygid} /etc/frr/vtysh* -chmod 440 /etc/sudoers.d/frr_sudoers chmod 644 /etc/frr/* ENVIRONMENTFILE=/etc/environment diff --git a/lib/agentx.c b/lib/agentx.c index eb354b6781..5deb8f1e06 100644 --- a/lib/agentx.c +++ b/lib/agentx.c @@ -138,7 +138,8 @@ agentx_events_update(void) static struct cmd_node agentx_node = { SMUX_NODE, - "" /* AgentX has no interface. */ + "", /* AgentX has no interface. */ + 1 }; /* Logging NetSNMP messages */ @@ -169,7 +170,7 @@ config_write_agentx (struct vty *vty) { if (agentx_enabled) vty_out (vty, "agentx%s", VTY_NEWLINE); - return 0; + return 1; } DEFUN (agentx_enable, @@ -187,7 +188,7 @@ DEFUN (agentx_enable, return CMD_SUCCESS; } vty_out (vty, "SNMP AgentX already enabled%s", VTY_NEWLINE); - return CMD_WARNING; + return CMD_SUCCESS; } DEFUN (no_agentx, diff --git a/tools/etc/sudoers.d/frr_sudoers b/tools/etc/sudoers.d/frr_sudoers deleted file mode 100644 index 4a42fb24f4..0000000000 --- a/tools/etc/sudoers.d/frr_sudoers +++ /dev/null @@ -1,15 +0,0 @@ -Defaults env_keep += VTYSH_PAGER - -# Allow user in group frr to run vtysh show commands -# without a password by uncommenting the "%frr" line below. - -# Subshell commands need to be disallowed, including -# preventing the user passing command line args like 'start-shell' -# Since vtysh allows minimum non-conflicting prefix'es, that means -# anything beginning with the string "st" in any arg. That's a bit -# restrictive. -# Instead, use NOEXEC, to prevent any exec'ed commands. - -Cmnd_Alias VTY_SHOW = /usr/bin/vtysh -c show * -# %frr ALL = (root) NOPASSWD:NOEXEC: VTY_SHOW - diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am index 8e7a6cede4..bb6bbbe87e 100644 --- a/vtysh/Makefile.am +++ b/vtysh/Makefile.am @@ -118,6 +118,10 @@ vtysh_scan += $(top_srcdir)/eigrpd/eigrp_dump.c vtysh_scan += $(top_srcdir)/eigrpd/eigrp_vty.c endif +if SNMP +vtysh_scan += $(top_srcdir)/lib/agentx.c +endif + vtysh_cmd_FILES = $(vtysh_scan) \ $(top_srcdir)/lib/keychain.c $(top_srcdir)/lib/routemap.c \ $(top_srcdir)/lib/filter.c $(top_srcdir)/lib/plist.c \ diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in index 169220c772..0ca1451ff5 100755 --- a/vtysh/extract.pl.in +++ b/vtysh/extract.pl.in @@ -90,6 +90,9 @@ foreach (@ARGV) { elsif ($file =~ /lib\/filter\.c$/) { $protocol = "VTYSH_ALL"; } + elsif ($file =~ /lib\/agentx\.c$/) { + $protocol = "VTYSH_RIPD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD|VTYSH_ZEBRA"; + } elsif ($file =~ /lib\/ns\.c$/) { $protocol = "VTYSH_ZEBRA"; } diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index 06e8569341..2a84847aaa 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -277,6 +277,7 @@ vtysh_config_parse_line (const char *line) if (strncmp (line, "log", strlen ("log")) == 0 || strncmp (line, "hostname", strlen ("hostname")) == 0 || strncmp (line, "frr", strlen ("frr")) == 0 + || strncmp (line, "agentx", strlen ("agentx")) == 0 ) config_add_line_uniq (config_top, line); else |
