summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <Jafaral@users.noreply.github.com>2019-07-09 16:59:17 +0200
committerGitHub <noreply@github.com>2019-07-09 16:59:17 +0200
commit7bc33bcc1996b554328792d80a8e5557ccaba6f5 (patch)
tree9666c3d7f95fd4246b9ff6248994973cdaef38f7
parentMerge pull request #4655 from qlyoung/fix-vrrp-iface-del-infiniteloop (diff)
parentlib: use flag from new libyang version to simplify the code (diff)
downloadfrr-7bc33bcc1996b554328792d80a8e5557ccaba6f5.tar.xz
frr-7bc33bcc1996b554328792d80a8e5557ccaba6f5.zip
Merge pull request #4088 from opensourcerouting/bump-libyang-requirement-vers
build, lib: bump libyang requirement version to >= 0.16.105 (-r3)
-rwxr-xr-xconfigure.ac15
-rw-r--r--doc/developer/building-libyang.rst2
-rw-r--r--doc/user/installation.rst16
-rw-r--r--lib/northbound.c11
4 files changed, 5 insertions, 39 deletions
diff --git a/configure.ac b/configure.ac
index 0911b9690..961336fbd 100755
--- a/configure.ac
+++ b/configure.ac
@@ -139,13 +139,6 @@ AC_ARG_WITH([yangmodelsdir], [AS_HELP_STRING([--with-yangmodelsdir=DIR], [yang m
])
AC_SUBST([yangmodelsdir])
-AC_ARG_WITH([libyang_pluginsdir], [AS_HELP_STRING([--with-libyang-pluginsdir=DIR], [yangmodule plugins directory (${libdir}/frr/libyang_plugins)])], [
- libyang_pluginsdir="$withval"
-], [
- libyang_pluginsdir="\${libdir}/frr/libyang_plugins"
-])
-AC_SUBST([libyang_pluginsdir])
-
AC_ARG_ENABLE(tcmalloc,
AS_HELP_STRING([--enable-tcmalloc], [Turn on tcmalloc]),
[case "${enableval}" in
@@ -1608,8 +1601,8 @@ AC_SUBST([SNMP_CFLAGS])
dnl ---------------
dnl libyang
dnl ---------------
-PKG_CHECK_MODULES([LIBYANG], [libyang >= 0.16.7], , [
- AC_MSG_ERROR([libyang (>= 0.16.7) was not found on your system.])
+PKG_CHECK_MODULES([LIBYANG], [libyang >= 0.16.105], , [
+ AC_MSG_ERROR([libyang (>= 0.16.105) was not found on your system.])
])
ac_cflags_save="$CFLAGS"
CFLAGS="$CFLAGS $LIBYANG_CFLAGS"
@@ -2166,24 +2159,20 @@ CFG_SBIN="$sbindir"
CFG_STATE="$frr_statedir"
CFG_MODULE="$moduledir"
CFG_YANGMODELS="$yangmodelsdir"
-CFG_LIBYANG_PLUGINS="$libyang_pluginsdir"
for I in 1 2 3 4 5 6 7 8 9 10; do
eval CFG_SYSCONF="\"$CFG_SYSCONF\""
eval CFG_SBIN="\"$CFG_SBIN\""
eval CFG_STATE="\"$CFG_STATE\""
eval CFG_MODULE="\"$CFG_MODULE\""
eval CFG_YANGMODELS="\"$CFG_YANGMODELS\""
- eval CFG_LIBYANG_PLUGINS="\"$CFG_LIBYANG_PLUGINS\""
done
AC_SUBST([CFG_SYSCONF])
AC_SUBST([CFG_SBIN])
AC_SUBST([CFG_STATE])
AC_SUBST([CFG_MODULE])
AC_SUBST([CFG_YANGMODELS])
-AC_SUBST([CFG_LIBYANG_PLUGINS])
AC_DEFINE_UNQUOTED([MODULE_PATH], ["$CFG_MODULE"], [path to modules])
AC_DEFINE_UNQUOTED([YANG_MODELS_PATH], ["$CFG_YANGMODELS"], [path to YANG data models])
-AC_DEFINE_UNQUOTED([LIBYANG_PLUGINS_PATH], ["$CFG_LIBYANG_PLUGINS"], [path to libyang plugins])
AC_DEFINE_UNQUOTED([WATCHFRR_SH_PATH], ["${CFG_SBIN%/}/watchfrr.sh"], [path to watchfrr.sh])
dnl various features
diff --git a/doc/developer/building-libyang.rst b/doc/developer/building-libyang.rst
index ed3e02990..f50b8cf72 100644
--- a/doc/developer/building-libyang.rst
+++ b/doc/developer/building-libyang.rst
@@ -10,7 +10,7 @@ The FRR project builds binary ``libyang`` packages, which we offer for download
.. warning::
- ``libyang`` version 0.16.74 or newer is required to build FRR.
+ ``libyang`` version 0.16.105 or newer is required to build FRR.
.. note::
diff --git a/doc/user/installation.rst b/doc/user/installation.rst
index 64949fc8e..b45c83ca1 100644
--- a/doc/user/installation.rst
+++ b/doc/user/installation.rst
@@ -331,22 +331,6 @@ options to the configuration script.
Look for YANG modules in `dir` [`prefix`/share/yang]. Note that the FRR
YANG modules will be installed here.
-.. option:: --with-libyang-pluginsdir <dir>
-
- Look for libyang plugins in `dir` [`prefix`/lib/frr/libyang_plugins].
- Note that the FRR libyang plugins will be installed here.
-
- This option is meaningless with libyang 0.16.74 or newer and will be
- removed once support for older libyang versions is dropped.
-
-When it's desired to run FRR without installing it in the system, it's possible
-to configure it as follows to look for YANG modules and libyang plugins in the
-compile directory:
-.. code-block:: shell
-
- ./configure --with-libyang-pluginsdir="`pwd`/yang/libyang_plugins/.libs" \
- --with-yangmodelsdir="`pwd`/yang"
-
Python dependency, documentation and tests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/lib/northbound.c b/lib/northbound.c
index b2ae1f66c..48b450e96 100644
--- a/lib/northbound.c
+++ b/lib/northbound.c
@@ -1386,19 +1386,12 @@ int nb_oper_data_iterate(const char *xpath, struct yang_translator *translator,
*/
ly_errno = 0;
dnode = lyd_new_path(NULL, ly_native_ctx, xpath, NULL, 0,
- LYD_PATH_OPT_UPDATE);
- if (!dnode && ly_errno) {
+ LYD_PATH_OPT_UPDATE | LYD_PATH_OPT_NOPARENTRET);
+ if (!dnode) {
flog_warn(EC_LIB_LIBYANG, "%s: lyd_new_path() failed",
__func__);
return NB_ERR;
}
- /*
- * We can remove the following two lines once we depend on
- * libyang-v0.16-r2, which has the LYD_PATH_OPT_NOPARENTRET flag for
- * lyd_new_path().
- */
- dnode = yang_dnode_get(dnode, xpath);
- assert(dnode);
/*
* Create a linked list to sort the data nodes starting from the root.