summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/.gitignore39
-rw-r--r--lib/command.c4
-rw-r--r--lib/command.h2
-rw-r--r--lib/command_lex.l5
-rw-r--r--lib/csv.c7
-rw-r--r--lib/defun_lex.l7
-rw-r--r--lib/ferr.c6
-rw-r--r--lib/frr_pthread.c13
-rw-r--r--lib/frr_pthread.h4
-rw-r--r--lib/frrstr.c4
-rw-r--r--lib/grammar_sandbox.c4
-rw-r--r--lib/grammar_sandbox_main.c4
-rw-r--r--lib/hook.c4
-rw-r--r--lib/if.c2
-rw-r--r--lib/imsg-buffer.c19
-rw-r--r--lib/imsg.c3
-rw-r--r--lib/lib_errors.c4
-rw-r--r--lib/log.c4
-rw-r--r--lib/memory.c3
-rw-r--r--lib/memory_vty.c2
-rw-r--r--lib/openbsd-tree.c4
-rw-r--r--lib/ptm_lib.c5
-rw-r--r--lib/queue.h13
-rw-r--r--lib/route_types.txt2
-rw-r--r--lib/skiplist.c1
-rw-r--r--lib/stream.c8
-rw-r--r--lib/strlcat.c6
-rw-r--r--lib/strlcpy.c6
-rw-r--r--lib/subdir.am42
-rw-r--r--lib/vty.c2
-rw-r--r--lib/zebra.h2
31 files changed, 176 insertions, 55 deletions
diff --git a/lib/.gitignore b/lib/.gitignore
index 072146dbd5..6176b30f8d 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -1,26 +1,13 @@
-!Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-version.c
-version.h
-gitversion.h
-gitversion.h.tmp
-.deps
-.nfs*
-.libs
-.arch-inventory
-.arch-ids
-*~
-*.loT
-route_types.h
-memtypes.h
-command_lex.c
-command_lex.h
-command_parse.c
-command_parse.h
-refix
-grammar_sandbox
-clippy
-defun_lex.c
+/version.c
+/version.h
+/gitversion.h
+/gitversion.h.tmp
+/route_types.h
+/memtypes.h
+/command_lex.c
+/command_lex.h
+/command_parse.c
+/command_parse.h
+/grammar_sandbox
+/clippy
+/defun_lex.c
diff --git a/lib/command.c b/lib/command.c
index 1df6442107..26afc762fb 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -146,6 +146,7 @@ const char *node_names[] = {
*/
"bfd", /* BFD_NODE */
"bfd peer", /* BFD_PEER_NODE */
+ "openfabric", // OPENFABRIC_NODE
};
/* clang-format on */
@@ -1197,6 +1198,7 @@ static int handle_pipe_action(struct vty *vty, const char *cmd_in,
/* retrieve action */
token = strsep(&working, " ");
+ assert(token);
/* match result to known actions */
if (strmatch(token, "include")) {
@@ -1435,6 +1437,7 @@ void cmd_exit(struct vty *vty)
case LDP_NODE:
case LDP_L2VPN_NODE:
case ISIS_NODE:
+ case OPENFABRIC_NODE:
case KEYCHAIN_NODE:
case RMAP_NODE:
case PBRMAP_NODE:
@@ -1550,6 +1553,7 @@ DEFUN (config_end,
case LDP_L2VPN_NODE:
case LDP_PSEUDOWIRE_NODE:
case ISIS_NODE:
+ case OPENFABRIC_NODE:
case KEYCHAIN_NODE:
case KEYCHAIN_KEY_NODE:
case VTY_NODE:
diff --git a/lib/command.h b/lib/command.h
index 75b69507ec..8e51641b88 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -141,6 +141,7 @@ enum node_type {
BGP_FLOWSPECV6_NODE, /* BGP IPv6 FLOWSPEC Address-Family */
BFD_NODE, /* BFD protocol mode. */
BFD_PEER_NODE, /* BFD peer configuration mode. */
+ OPENFABRIC_NODE, /* OpenFabric router configuration node */
NODE_TYPE_MAX, /* maximum */
};
@@ -364,7 +365,6 @@ struct cmd_node {
#define PREFIX_LIST_STR "Build a prefix list\n"
#define OSPF6_DUMP_TYPE_LIST \
"<neighbor|interface|area|lsa|zebra|config|dbex|spf|route|lsdb|redistribute|hook|asbr|prefix|abr>"
-#define ISIS_STR "IS-IS information\n"
#define AREA_TAG_STR "[area tag]\n"
#define COMMUNITY_AANN_STR "Community number where AA and NN are (0-65535)\n"
#define COMMUNITY_VAL_STR "Community number in AA:NN format (where AA and NN are (0-65535)) or local-AS|no-advertise|no-export|internet or additive\n"
diff --git a/lib/command_lex.l b/lib/command_lex.l
index 0d6e6ee7e5..3b18b58a2e 100644
--- a/lib/command_lex.l
+++ b/lib/command_lex.l
@@ -22,6 +22,11 @@
* 02111-1307, USA.
*/
+%top{
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+}
%{
/* ignore flex generated code in static analyzer */
#ifndef __clang_analyzer__
diff --git a/lib/csv.c b/lib/csv.c
index ce84783aa6..582106ebd4 100644
--- a/lib/csv.c
+++ b/lib/csv.c
@@ -17,6 +17,11 @@
* with this program; see the file COPYING; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -563,6 +568,8 @@ void csv_decode(csv_t *csv, char *inbuf)
csv_record_t *rec;
buf = (inbuf) ? inbuf : csv->buf;
+ assert(buf);
+
pos = strpbrk(buf, "\n");
while (pos != NULL) {
rec = calloc(1, sizeof(csv_record_t));
diff --git a/lib/defun_lex.l b/lib/defun_lex.l
index d901c26a2e..6c0805a4fa 100644
--- a/lib/defun_lex.l
+++ b/lib/defun_lex.l
@@ -1,4 +1,3 @@
-%{
/*
* clippy (CLI preparator in python) C pseudo-lexer
* Copyright (C) 2016-2017 David Lamparter for NetDEF, Inc.
@@ -34,6 +33,12 @@
* code documentation in it.
*/
+%top{
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+}
+%{
/* ignore harmless bugs in old versions of flex */
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wunused-value"
diff --git a/lib/ferr.c b/lib/ferr.c
index 35d0fe4ff4..afef196cec 100644
--- a/lib/ferr.c
+++ b/lib/ferr.c
@@ -14,6 +14,10 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
@@ -148,7 +152,7 @@ void log_ref_display(struct vty *vty, uint32_t code, bool json)
snprintf(pbuf, sizeof(pbuf), "\nError %"PRIu32" - %s",
ref->code, ref->title);
memset(ubuf, '=', strlen(pbuf));
- ubuf[strlen(pbuf) - 1] = '\0';
+ ubuf[strlen(pbuf)] = '\0';
vty_out(vty, "%s\n%s\n", pbuf, ubuf);
vty_out(vty, "Description:\n%s\n\n", ref->description);
diff --git a/lib/frr_pthread.c b/lib/frr_pthread.c
index c0aae5e52e..d48b23f38a 100644
--- a/lib/frr_pthread.c
+++ b/lib/frr_pthread.c
@@ -19,6 +19,9 @@
#include <zebra.h>
#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
#include <sched.h>
#include "frr_pthread.h"
@@ -163,10 +166,14 @@ int frr_pthread_set_name(struct frr_pthread *fpt, const char *name,
pthread_mutex_lock(&fpt->mtx);
snprintf(fpt->os_name, OS_THREAD_NAMELEN, "%s", os_name);
pthread_mutex_unlock(&fpt->mtx);
-#ifdef GNU_LINUX
+#ifdef HAVE_PTHREAD_SETNAME_NP
+# ifdef GNU_LINUX
ret = pthread_setname_np(fpt->thread, fpt->os_name);
-#elif defined(OPEN_BSD)
- ret = pthread_set_name_np(fpt->thread, fpt->os_name);
+# else /* NetBSD */
+ ret = pthread_setname_np(fpt->thread, fpt->os_name, NULL);
+# endif
+#elif defined(HAVE_PTHREAD_SET_NAME_NP)
+ pthread_set_name_np(fpt->thread, fpt->os_name);
#endif
}
diff --git a/lib/frr_pthread.h b/lib/frr_pthread.h
index cc4fc74337..732e2925fe 100644
--- a/lib/frr_pthread.h
+++ b/lib/frr_pthread.h
@@ -234,4 +234,8 @@ void frr_pthread_yield(void);
*/
uint32_t frr_pthread_get_id(void);
+#ifndef HAVE_PTHREAD_CONDATTR_SETCLOCK
+#define pthread_condattr_setclock(A, B)
+#endif
+
#endif /* _FRR_PTHREAD_H */
diff --git a/lib/frrstr.c b/lib/frrstr.c
index 715e67b868..85d968182b 100644
--- a/lib/frrstr.c
+++ b/lib/frrstr.c
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c
index 51e7a3987e..ef03e85217 100644
--- a/lib/grammar_sandbox.c
+++ b/lib/grammar_sandbox.c
@@ -23,6 +23,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "command.h"
#include "memory_vty.h"
#include "graph.h"
diff --git a/lib/grammar_sandbox_main.c b/lib/grammar_sandbox_main.c
index 264c7c48f0..c9c942f9bf 100644
--- a/lib/grammar_sandbox_main.c
+++ b/lib/grammar_sandbox_main.c
@@ -23,6 +23,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "command.h"
#include "memory_vty.h"
diff --git a/lib/hook.c b/lib/hook.c
index 935064f4d2..4fe305f282 100644
--- a/lib/hook.c
+++ b/lib/hook.c
@@ -20,6 +20,10 @@
* DEALINGS IN THE SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "memory.h"
#include "hook.h"
diff --git a/lib/if.c b/lib/if.c
index 2bf0c6e6b5..a03c9da6f9 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -619,7 +619,7 @@ DEFUN (no_interface_desc,
* if not:
* - no idea, just get the name in its entirety.
*/
-static struct interface *if_sunwzebra_get(char *name, vrf_id_t vrf_id)
+static struct interface *if_sunwzebra_get(const char *name, vrf_id_t vrf_id)
{
struct interface *ifp;
char *cp;
diff --git a/lib/imsg-buffer.c b/lib/imsg-buffer.c
index b83f1f76f2..c2f4052b8f 100644
--- a/lib/imsg-buffer.c
+++ b/lib/imsg-buffer.c
@@ -21,9 +21,9 @@
#include "queue.h"
#include "imsg.h"
-int ibuf_realloc(struct ibuf *, size_t);
-void ibuf_enqueue(struct msgbuf *, struct ibuf *);
-void ibuf_dequeue(struct msgbuf *, struct ibuf *);
+static int ibuf_realloc(struct ibuf *, size_t);
+static void ibuf_enqueue(struct msgbuf *, struct ibuf *);
+static void ibuf_dequeue(struct msgbuf *, struct ibuf *);
struct ibuf *ibuf_open(size_t len)
{
@@ -57,7 +57,7 @@ struct ibuf *ibuf_dynamic(size_t len, size_t max)
return (buf);
}
-int ibuf_realloc(struct ibuf *buf, size_t len)
+static int ibuf_realloc(struct ibuf *buf, size_t len)
{
uint8_t *b;
@@ -183,6 +183,8 @@ void msgbuf_drain(struct msgbuf *msgbuf, size_t n)
next = TAILQ_NEXT(buf, entry);
if (buf->rpos + n >= buf->wpos) {
n -= buf->wpos - buf->rpos;
+
+ TAILQ_REMOVE(&msgbuf->bufs, buf, entry);
ibuf_dequeue(msgbuf, buf);
} else {
buf->rpos += n;
@@ -195,7 +197,7 @@ void msgbuf_clear(struct msgbuf *msgbuf)
{
struct ibuf *buf;
- while ((buf = TAILQ_FIRST(&msgbuf->bufs)) != NULL)
+ while ((buf = TAILQ_POP_FIRST(&msgbuf->bufs, entry)) != NULL)
ibuf_dequeue(msgbuf, buf);
}
@@ -266,16 +268,15 @@ again:
return (1);
}
-void ibuf_enqueue(struct msgbuf *msgbuf, struct ibuf *buf)
+static void ibuf_enqueue(struct msgbuf *msgbuf, struct ibuf *buf)
{
TAILQ_INSERT_TAIL(&msgbuf->bufs, buf, entry);
msgbuf->queued++;
}
-void ibuf_dequeue(struct msgbuf *msgbuf, struct ibuf *buf)
+static void ibuf_dequeue(struct msgbuf *msgbuf, struct ibuf *buf)
{
- TAILQ_REMOVE(&msgbuf->bufs, buf, entry);
-
+ /* TAILQ_REMOVE done by caller */
if (buf->fd != -1)
close(buf->fd);
diff --git a/lib/imsg.c b/lib/imsg.c
index 5424140720..935d137727 100644
--- a/lib/imsg.c
+++ b/lib/imsg.c
@@ -299,11 +299,10 @@ int imsg_get_fd(struct imsgbuf *ibuf)
int fd;
struct imsg_fd *ifd;
- if ((ifd = TAILQ_FIRST(&ibuf->fds)) == NULL)
+ if ((ifd = TAILQ_POP_FIRST(&ibuf->fds, entry)) == NULL)
return (-1);
fd = ifd->fd;
- TAILQ_REMOVE(&ibuf->fds, ifd, entry);
free(ifd);
return (fd);
diff --git a/lib/lib_errors.c b/lib/lib_errors.c
index 332a5b1d45..2ddc571e68 100644
--- a/lib/lib_errors.c
+++ b/lib/lib_errors.c
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "lib_errors.h"
/* clang-format off */
diff --git a/lib/log.c b/lib/log.c
index 010b984786..521783e4b0 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -1074,6 +1074,8 @@ int proto_redistnum(int afi, const char *s)
return ZEBRA_ROUTE_BABEL;
else if (strmatch(s, "sharp"))
return ZEBRA_ROUTE_SHARP;
+ else if (strmatch(s, "openfabric"))
+ return ZEBRA_ROUTE_OPENFABRIC;
}
if (afi == AFI_IP6) {
if (strmatch(s, "kernel"))
@@ -1102,6 +1104,8 @@ int proto_redistnum(int afi, const char *s)
return ZEBRA_ROUTE_BABEL;
else if (strmatch(s, "sharp"))
return ZEBRA_ROUTE_SHARP;
+ else if (strmatch(s, "openfabric"))
+ return ZEBRA_ROUTE_OPENFABRIC;
}
return -1;
}
diff --git a/lib/memory.c b/lib/memory.c
index 695bbfe115..fee23a75ac 100644
--- a/lib/memory.c
+++ b/lib/memory.c
@@ -20,6 +20,9 @@
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
+#ifdef HAVE_MALLOC_NP_H
+#include <malloc_np.h>
+#endif
#ifdef HAVE_MALLOC_MALLOC_H
#include <malloc/malloc.h>
#endif
diff --git a/lib/memory_vty.c b/lib/memory_vty.c
index 73a18529a2..5fd9c3b900 100644
--- a/lib/memory_vty.c
+++ b/lib/memory_vty.c
@@ -28,7 +28,9 @@
#include <malloc/malloc.h>
#endif
#include <dlfcn.h>
+#ifdef HAVE_LINK_H
#include <link.h>
+#endif
#include "log.h"
#include "memory.h"
diff --git a/lib/openbsd-tree.c b/lib/openbsd-tree.c
index 35bfce3a89..e8d13339b6 100644
--- a/lib/openbsd-tree.c
+++ b/lib/openbsd-tree.c
@@ -41,6 +41,10 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <lib/openbsd-tree.h>
diff --git a/lib/ptm_lib.c b/lib/ptm_lib.c
index 69fd61e2a0..7f868beda4 100644
--- a/lib/ptm_lib.c
+++ b/lib/ptm_lib.c
@@ -17,6 +17,11 @@
* with this program; see the file COPYING; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
diff --git a/lib/queue.h b/lib/queue.h
index 04fbeee700..11e28b4c91 100644
--- a/lib/queue.h
+++ b/lib/queue.h
@@ -72,4 +72,17 @@
#include "freebsd-queue.h"
#endif /* defined(__OpenBSD__) && !defined(STAILQ_HEAD) */
+#ifndef TAILQ_POP_FIRST
+#define TAILQ_POP_FIRST(head, field) \
+ ({ typeof((head)->tqh_first) _elm = TAILQ_FIRST(head); \
+ if (_elm) { \
+ if ((TAILQ_NEXT((_elm), field)) != NULL) \
+ TAILQ_NEXT((_elm), field)->field.tqe_prev = \
+ &TAILQ_FIRST(head); \
+ else \
+ (head)->tqh_last = &TAILQ_FIRST(head); \
+ TAILQ_FIRST(head) = TAILQ_NEXT((_elm), field); \
+ }; _elm; })
+#endif
+
#endif /* _FRR_QUEUE_H */
diff --git a/lib/route_types.txt b/lib/route_types.txt
index 72f59a1b78..c5eff44ca7 100644
--- a/lib/route_types.txt
+++ b/lib/route_types.txt
@@ -82,6 +82,7 @@ ZEBRA_ROUTE_BABEL, babel, babeld, 'A', 1, 1, 1, "Babel"
ZEBRA_ROUTE_SHARP, sharp, sharpd, 'D', 1, 1, 1, "SHARP"
ZEBRA_ROUTE_PBR, pbr, pbrd, 'F', 1, 1, 0, "PBR"
ZEBRA_ROUTE_BFD, bfd, bfdd, '-', 0, 0, 0, "BFD"
+ZEBRA_ROUTE_OPENFABRIC, openfabric, fabricd, 'f', 1, 1, 1, "OpenFabric"
ZEBRA_ROUTE_ALL, wildcard, none, '-', 0, 0, 0, "-"
@@ -109,3 +110,4 @@ ZEBRA_ROUTE_BABEL, "Babel routing protocol (Babel)"
ZEBRA_ROUTE_SHARP, "Super Happy Advanced Routing Protocol (sharpd)"
ZEBRA_ROUTE_PBR, "Policy Based Routing (PBR)"
ZEBRA_ROUTE_BFD, "Bidirectional Fowarding Detection (BFD)"
+ZEBRA_ROUTE_OPENFABRIC, "OpenFabric Routing Protocol"
diff --git a/lib/skiplist.c b/lib/skiplist.c
index a36bf47139..585cf859e5 100644
--- a/lib/skiplist.c
+++ b/lib/skiplist.c
@@ -202,6 +202,7 @@ int skiplist_insert(register struct skiplist *l, register void *key,
}
k = randomLevel();
+ assert(k >= 0);
if (k > l->level) {
k = ++l->level;
update[k] = l->header;
diff --git a/lib/stream.c b/lib/stream.c
index 55e7f64358..589a229256 100644
--- a/lib/stream.c
+++ b/lib/stream.c
@@ -270,7 +270,7 @@ void stream_forward_endp(struct stream *s, size_t size)
}
/* Copy from stream to destination. */
-inline bool stream_get2(void *dst, struct stream *s, size_t size)
+bool stream_get2(void *dst, struct stream *s, size_t size)
{
STREAM_VERIFY_SANE(s);
@@ -299,7 +299,7 @@ void stream_get(void *dst, struct stream *s, size_t size)
}
/* Get next character from the stream. */
-inline bool stream_getc2(struct stream *s, uint8_t *byte)
+bool stream_getc2(struct stream *s, uint8_t *byte)
{
STREAM_VERIFY_SANE(s);
@@ -344,7 +344,7 @@ uint8_t stream_getc_from(struct stream *s, size_t from)
return c;
}
-inline bool stream_getw2(struct stream *s, uint16_t *word)
+bool stream_getw2(struct stream *s, uint16_t *word)
{
STREAM_VERIFY_SANE(s);
@@ -465,7 +465,7 @@ void stream_get_from(void *dst, struct stream *s, size_t from, size_t size)
memcpy(dst, s->data + from, size);
}
-inline bool stream_getl2(struct stream *s, uint32_t *l)
+bool stream_getl2(struct stream *s, uint32_t *l)
{
STREAM_VERIFY_SANE(s);
diff --git a/lib/strlcat.c b/lib/strlcat.c
index be211f82a8..39773d9ac8 100644
--- a/lib/strlcat.c
+++ b/lib/strlcat.c
@@ -20,11 +20,13 @@
/* adapted for Quagga from glibc patch submission originally from
* Florian Weimer <fweimer@redhat.com>, 2016-05-18 */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdint.h>
#include <string.h>
-#include "config.h"
-
#ifndef HAVE_STRLCAT
#undef strlcat
diff --git a/lib/strlcpy.c b/lib/strlcpy.c
index b0c33ca7f4..71ee9f1a54 100644
--- a/lib/strlcpy.c
+++ b/lib/strlcpy.c
@@ -20,9 +20,11 @@
/* adapted for Quagga from glibc patch submission originally from
* Florian Weimer <fweimer@redhat.com>, 2016-05-18 */
-#include <string.h>
-
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
+
+#include <string.h>
#ifndef HAVE_STRLCPY
#undef strlcpy
diff --git a/lib/subdir.am b/lib/subdir.am
index ef6c8f8e55..499bb94920 100644
--- a/lib/subdir.am
+++ b/lib/subdir.am
@@ -84,6 +84,22 @@ lib_libfrr_la_SOURCES = \
lib/logicalrouter.c \
# end
+vtysh_scan += \
+ $(top_srcdir)/lib/distribute.c \
+ $(top_srcdir)/lib/filter.c \
+ $(top_srcdir)/lib/if.c \
+ $(top_srcdir)/lib/if_rmap.c \
+ $(top_srcdir)/lib/keychain.c \
+ $(top_srcdir)/lib/logicalrouter.c \
+ $(top_srcdir)/lib/nexthop_group.c \
+ $(top_srcdir)/lib/plist.c \
+ $(top_srcdir)/lib/routemap.c \
+ $(top_srcdir)/lib/vrf.c \
+ $(top_srcdir)/lib/vty.c \
+ # end
+# can be loaded as DSO - always include for vtysh
+vtysh_scan += $(top_srcdir)/lib/agentx.c
+
lib/plist_clippy.c: $(CLIPPY_DEPS)
lib/plist.lo: lib/plist_clippy.c
lib/nexthop_group_clippy.c: $(CLIPPY_DEPS)
@@ -152,6 +168,7 @@ pkginclude_HEADERS += \
lib/sha256.h \
lib/sigevent.h \
lib/skiplist.h \
+ lib/smux.h \
lib/sockopt.h \
lib/sockunion.h \
lib/spf_backoff.h \
@@ -237,9 +254,10 @@ lib_grammar_sandbox_SOURCES = \
lib_grammar_sandbox_LDADD = \
lib/libfrr.la
-lib_clippy_CPPFLAGS = $(AM_CPPFLAGS) -D_GNU_SOURCE -DBUILDING_CLIPPY @SAN_CLIPPY_FLAGS@
-lib_clippy_CFLAGS = $(PYTHON_CFLAGS) @SAN_CLIPPY_FLAGS@
+lib_clippy_CPPFLAGS = $(AM_CPPFLAGS) -D_GNU_SOURCE -DBUILDING_CLIPPY
+lib_clippy_CFLAGS = $(PYTHON_CFLAGS)
lib_clippy_LDADD = $(PYTHON_LIBS)
+lib_clippy_LDFLAGS = -export-dynamic
lib_clippy_SOURCES = \
lib/clippy.c \
lib/command_graph.c \
@@ -252,6 +270,26 @@ lib_clippy_SOURCES = \
lib/vector.c \
# end
+# (global) clippy rules for all directories
+
+AM_V_CLIPPY = $(am__v_CLIPPY_$(V))
+am__v_CLIPPY_ = $(am__v_CLIPPY_$(AM_DEFAULT_VERBOSITY))
+am__v_CLIPPY_0 = @echo " CLIPPY " $@;
+am__v_CLIPPY_1 =
+
+CLIPPY_DEPS = $(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py
+
+SUFFIXES = _clippy.c .proto .pb-c.c .pb-c.h .pb.h
+.c_clippy.c:
+ @{ test -x $(top_builddir)/$(HOSTTOOLS)lib/clippy || \
+ $(MAKE) -C $(top_builddir)/$(HOSTTOOLS) lib/clippy; }
+ $(AM_V_CLIPPY) $(top_builddir)/$(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py -o $@ $<
+
+## automake's "ylwrap" is a great piece of GNU software... not.
+.l.c:
+ $(AM_V_LEX)$(am__skiplex) $(LEXCOMPILE) $<
+.y.c:
+ $(AM_V_YACC)$(am__skipyacc) $(YACCCOMPILE) $<
#
# generated sources & extra foo
diff --git a/lib/vty.c b/lib/vty.c
index 748c14f675..480137a7a9 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -811,6 +811,7 @@ static void vty_end_config(struct vty *vty)
case LDP_L2VPN_NODE:
case LDP_PSEUDOWIRE_NODE:
case ISIS_NODE:
+ case OPENFABRIC_NODE:
case KEYCHAIN_NODE:
case KEYCHAIN_KEY_NODE:
case VTY_NODE:
@@ -1210,6 +1211,7 @@ static void vty_stop_input(struct vty *vty)
case LDP_L2VPN_NODE:
case LDP_PSEUDOWIRE_NODE:
case ISIS_NODE:
+ case OPENFABRIC_NODE:
case KEYCHAIN_NODE:
case KEYCHAIN_KEY_NODE:
case VTY_NODE:
diff --git a/lib/zebra.h b/lib/zebra.h
index b12f6616ba..d80aa06935 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -28,7 +28,6 @@
#include "compiler.h"
#ifdef SUNOS_5
-#define _XPG4_2
typedef unsigned int uint32_t;
typedef unsigned short uint16_t;
typedef unsigned char uint8_t;
@@ -414,6 +413,7 @@ extern const char *zserv_command_string(unsigned int command);
#define ZEBRA_FLAG_FIB_OVERRIDE 0x200
#define ZEBRA_FLAG_EVPN_ROUTE 0x400
#define ZEBRA_FLAG_RR_USE_DISTANCE 0x800
+#define ZEBRA_FLAG_ONLINK 0x1000
/* ZEBRA_FLAG_BLACKHOLE was 0x04 */
/* ZEBRA_FLAG_REJECT was 0x80 */