Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
cd2ea95
common UPDATE do not generate invalid (x)paths
michalvasko Jun 25, 2026
49e1f9c
SOVERSION bump to version 5.5.6
michalvasko Jun 25, 2026
781bf4c
VERSION bump to version 5.8.7
michalvasko Jun 25, 2026
fec05f5
tree data BUGFIX memory leak
michalvasko Jun 25, 2026
0c87089
schema compile BUGFIX deterministic order of augment nodes
michalvasko Jun 25, 2026
406731b
SOVERSION bump to version 5.5.7
michalvasko Jun 25, 2026
8904e86
VERSION bump to version 5.8.8
michalvasko Jun 25, 2026
f449b65
validation UPDATE nested when validation
michalvasko Jun 30, 2026
68b8c08
schema compile UPDATE dynamic compile path
michalvasko Jun 30, 2026
058fed2
SOVERSION bump to version 5.5.8
michalvasko Jun 30, 2026
965659e
VERSION bump to version 5.8.9
michalvasko Jun 30, 2026
0832d88
xpath BUGFIX swapped arguments
michalvasko Jun 30, 2026
f560179
SOVERSION bump to version 5.5.9
michalvasko Jun 30, 2026
c82389d
VERSION bump to version 5.8.10
michalvasko Jun 30, 2026
501b226
parser lyb UPDATE connect nodes right after creation
michalvasko Jul 1, 2026
2017d02
SOVERSION bump to version 5.5.10
michalvasko Jul 1, 2026
8d34228
VERSION bump to version 5.8.11
michalvasko Jul 1, 2026
47ee9b7
ADD CBOR support
MeherRushi Jul 19, 2025
cfe5edf
CBOR REFACTOR address PR review comments
Ardival Jun 29, 2026
634f763
tree schema BUGFIX missing cbor enums
michalvasko Jul 1, 2026
d50af4c
xpath BUGFIX consider top-level schema nodes
michalvasko Jul 1, 2026
29c06ea
SOVERSION bump to version 5.6.0
michalvasko Jul 1, 2026
8fbe2f5
VERSION bump to version 6.0.0
michalvasko Jul 1, 2026
2bfdbe4
parser lyb UPDATE check for all read errors
michalvasko Jul 2, 2026
cceba8d
parser lyb BUGFIX check for invalid node type
michalvasko Jul 2, 2026
2ee5746
integer BUGFIX check for invalid LYB value size
michalvasko Jul 2, 2026
01c5f59
parser xml BUGFIX invalid pointer access
michalvasko Jul 2, 2026
deca056
SOVERSION bump to version 5.6.1
michalvasko Jul 2, 2026
cd819bc
VERSION bump to version 6.0.1
michalvasko Jul 2, 2026
c6cb7fd
plugins types BUGFIX print mandatory first node prefix
michalvasko Jul 3, 2026
5bb4267
SOVERSION bump to version 5.6.2
michalvasko Jul 3, 2026
3bb7a85
VERSION bump to version 6.0.2
michalvasko Jul 3, 2026
5315425
parser lyb BUGFIX memory leaks
michalvasko Jul 3, 2026
78a8c6e
SOVERSION bump to version 5.6.3
michalvasko Jul 3, 2026
193c973
VERSION bump to version 6.0.3
michalvasko Jul 3, 2026
b3404d2
tests: extend fuzz parser coverage
BeaCox Jul 2, 2026
de3cb24
utests UPDATE test teardown print error message
Ardival Jul 13, 2026
4793a4e
plugins REFACTOR unused var
michalvasko Jul 13, 2026
ebd39fb
cmake BUGFIX cbor linking
Ardival Jul 7, 2026
1dcce7a
printer CBOR BUGFIX fix map key generation for list and leaf-list
Ardival Jul 7, 2026
1c2ee7f
parser internal BUGFIX CBOR type casting
Ardival Jul 7, 2026
974294a
plugins BUGFIX missing cbor enums
Ardival Jul 7, 2026
fd4d513
parser cbor BUGFIX consider empty instances
Ardival Jul 7, 2026
4c0c163
tests UPDATE cbor printer and parser
Ardival Jul 7, 2026
6396780
lcbor BUGFIX free logger location
Ardival Jul 13, 2026
c889ee0
utests basic UPDATE replace internal functions with API
May 25, 2026
70f427b
utests data UPDATE replace internal functions with API
May 29, 2026
663489a
utests schema UPDATE replace internal funstions with API
May 29, 2026
63fcaa6
utests type UPDATE replace internal funstions with API
Jun 8, 2026
e7881c3
utests UPDATE remove unused headers
Jun 2, 2026
93c66d2
yanglint UPDATE add command to generate skeleton sample in XML or JSON
Jun 11, 2026
c5d8994
yanglint UPDATE add command for IETF validation
Jun 15, 2026
395c15c
SOVERSION bump to version 5.6.4
michalvasko Jul 13, 2026
3eb3f18
VERSION bump to version 6.1.0
michalvasko Jul 13, 2026
186ea37
diff BUGFIX climb data tree parents to cross schema-mount boundary
Humblesaw Jul 14, 2026
ac5b162
SOVERSION bump to version 5.6.5
michalvasko Jul 14, 2026
6aeaf02
VERSION bump to version 6.1.1
michalvasko Jul 14, 2026
f9d7c85
yanglint BUGFIX missing space in help
HanzlikPetr Jul 24, 2026
720a577
schema compile BUGFIX link children for all node types
michalvasko Jul 24, 2026
672d225
SOVERSION bump to version 5.6.6
michalvasko Jul 24, 2026
03c6a0e
VERSION bump to version 6.1.2
michalvasko Jul 24, 2026
9756c4a
tree data BUGFIX forbid inserting into term nodes
michalvasko Jul 24, 2026
6f4369d
parser lyb BUGFIX bound memory input reads (#2538)
Alearner12 Jul 27, 2026
a32efcb
parser yang BUGFIX proper temporary input replacement
michalvasko Jul 29, 2026
1049396
SOVERSION bump to version 5.6.7
michalvasko Jul 29, 2026
215f451
VERSION bump to version 6.1.3
michalvasko Jul 29, 2026
147e335
xml REFACTOR diffferent signess of operands
michalvasko Jul 29, 2026
2bd2bb9
tree data BUGFIX always generate error on error return
michalvasko Jul 29, 2026
f1cb249
SOVERSION bump to version 5.6.8
michalvasko Jul 29, 2026
728958a
VERSION bump to version 6.1.4
michalvasko Jul 29, 2026
2f7d04e
tree schema BUGFIX module revision invalid order message (#2547)
jktjkt Aug 6, 2026
d310feb
parser lyb BUGFIX proper overflow check
michalvasko Aug 6, 2026
2c8f592
parser lyb BUGFIX correct hash array size
michalvasko Aug 6, 2026
fa6a0fc
SOVERSION bump to version 5.6.9
michalvasko Aug 6, 2026
1b3a895
VERSION bump to version 6.1.5
michalvasko Aug 6, 2026
6a1f264
xml BUGFIX cast type range
michalvasko Aug 7, 2026
51cc71f
tree printer BUGFIX extension switching in loop (#2550)
lePici Aug 7, 2026
f278029
parser cbor REFACTOR redundant code
michalvasko Aug 7, 2026
a333a0c
parser cbor BUGFIX release unint var
michalvasko Aug 7, 2026
ba84ab6
printer cbor REFACTOR check array push return
michalvasko Aug 7, 2026
cbc6254
parser BUGFIX anydata content inherits the module
michalvasko Aug 7, 2026
c7c6fd4
parser cbor BUGFIX byte string length
michalvasko Aug 7, 2026
2f92244
parser cbor REFACTOR unified node insert
michalvasko Aug 7, 2026
797910a
SOVERSION bump to version 5.6.10
michalvasko Aug 7, 2026
314ed59
VERSION bump to version 6.1.6
michalvasko Aug 7, 2026
2d2e73d
Update README.md
rgwilton Aug 7, 2026
32a31e0
printer lyb BUGFIX avoid invalid pointer dereference
michalvasko Aug 11, 2026
01ac495
SOVERSION bump to version 5.6.11
michalvasko Aug 11, 2026
6521779
VERSION bump to version 6.1.7
michalvasko Aug 11, 2026
6826343
config UPDATE redundant public macro
michalvasko Aug 12, 2026
71ce8fd
xpath1.0 BUGFIX proper usage of temp log options
michalvasko Aug 13, 2026
876d91b
SOVERSION bump to version 5.6.12
michalvasko Aug 13, 2026
87409e0
VERSION bump to version 6.1.8
michalvasko Aug 13, 2026
549f939
path BUGFIX do not allow fractions as position
michalvasko Aug 14, 2026
cfe1243
schema compile BUGFIX proper pattern format inheritance
michalvasko Aug 17, 2026
2faaece
context UPDATE include internal modules in ctx hash
michalvasko Aug 17, 2026
26d8271
SOVERSION bump to version 5.6.13
michalvasko Aug 17, 2026
3042369
VERSION bump to version 6.1.9
michalvasko Aug 17, 2026
317b951
printer cbor BUGFIX crash when printing (leaf-)lists nested in a list
manoe Aug 17, 2026
4af7c7f
parser lyb BUGFIX avoid feature err msg overflow
michalvasko Aug 18, 2026
3a16bfe
parser lyb UPDATE check for max node depth level
michalvasko Aug 18, 2026
ce0de06
doc UPDATE clarify dangers of reading unbound data
michalvasko Aug 18, 2026
58e8505
SOVERSION bump to version 5.6.14
michalvasko Aug 18, 2026
e0e1028
VERSION bump to version 6.1.10
michalvasko Aug 18, 2026
8f496e9
printer context BUGFIX missing pattern member
michalvasko Aug 18, 2026
2fc2aaf
SOVERSION bump to version 5.6.15
michalvasko Aug 18, 2026
7658afb
VERSION bump to version 6.1.11
michalvasko Aug 18, 2026
d9f8639
printer sid UPDATE create functions for generation and update sid file
HanzlikPetr Aug 11, 2026
3bccd38
yanglint UPDATE add command for sid file
HanzlikPetr Aug 19, 2026
5c15678
SOVERSION bump to version 5.7.0
michalvasko Aug 20, 2026
f6f8e76
VERSION bump to version 6.2.0
michalvasko Aug 20, 2026
7142ccf
yanglint REFACTOR safety assert
michalvasko Aug 20, 2026
806b2ff
printer sid BUGFIX include nodes augmented into other modules
manoe Aug 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
options: "-DENABLE_TESTS=ON",
packager: "sudo apt-get",
# no expect because stdout seems to be redirected
packages: "libcmocka-dev libxxhash-dev",
packages: "libcmocka-dev libxxhash-dev libcbor-dev",
snaps: "",
build-cmd: "make"
}
Expand All @@ -36,7 +36,7 @@ jobs:
cc: "clang",
options: "-DENABLE_TESTS=ON",
packager: "sudo apt-get",
packages: "libcmocka-dev libxxhash-dev",
packages: "libcmocka-dev libxxhash-dev libcbor-dev",
snaps: "",
build-cmd: "make"
}
Expand All @@ -47,7 +47,7 @@ jobs:
cc: "gcc",
options: "",
packager: "sudo apt-get",
packages: "libcmocka-dev libxxhash-dev valgrind",
packages: "libcmocka-dev libxxhash-dev libcbor-dev valgrind",
snaps: "",
build-cmd: "make"
}
Expand All @@ -59,7 +59,7 @@ jobs:
options: "",
packager: "sudo apt-get",
# no valgrind because it does not support DWARF5 yet generated by clang 14
packages: "libcmocka-dev libxxhash-dev",
packages: "libcmocka-dev libxxhash-dev libcbor-dev",
snaps: "",
build-cmd: "make"
}
Expand All @@ -70,7 +70,7 @@ jobs:
cc: "clang",
options: "-DENABLE_TESTS=ON -DPATH_EXPECT=",
packager: "brew",
packages: "cmocka xxhash tcl-tk",
packages: "cmocka xxhash tcl-tk libcbor",
snaps: "",
build-cmd: "make"
}
Expand All @@ -81,7 +81,7 @@ jobs:
cc: "clang",
options: "-DCMAKE_C_FLAGS=-fsanitize=address,undefined -DENABLE_TESTS=ON -DENABLE_VALGRIND_TESTS=OFF",
packager: "sudo apt-get",
packages: "libcmocka-dev libxxhash-dev",
packages: "libcmocka-dev libxxhash-dev libcbor-dev",
snaps: "",
build-cmd: "make"
}
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
prepare: |
echo "Installing dependencies..."
pkg update -f
pkg install -y cmake cmocka xxhash bash git pcre2
pkg install -y cmake cmocka xxhash bash git pcre2 libcbor

run: |
set -e
Expand All @@ -308,7 +308,7 @@ jobs:
i386/ubuntu \
/bin/bash -c " \
apt-get update -q && \
apt-get install -y -q git cmake gcc libcmocka-dev libxxhash-dev libpcre2-dev && \
apt-get install -y -q git cmake gcc libcmocka-dev libxxhash-dev libpcre2-dev libcbor-dev && \
mkdir build && cd build && \
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=ON .. && \
make && \
Expand Down Expand Up @@ -338,7 +338,7 @@ jobs:
# install dependencies inside the emulated container
install: |
apt-get update -q -y
apt-get install -q -y git cmake gcc libcmocka-dev libxxhash-dev libpcre2-dev
apt-get install -q -y git cmake gcc libcmocka-dev libxxhash-dev libpcre2-dev libcbor-dev

# run the build
run: |
Expand Down
54 changes: 39 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ set(CMAKE_MACOSX_RPATH TRUE)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

# set version of the project
set(LIBYANG_MAJOR_VERSION 5)
set(LIBYANG_MINOR_VERSION 8)
set(LIBYANG_MICRO_VERSION 6)
set(LIBYANG_MAJOR_VERSION 6)
set(LIBYANG_MINOR_VERSION 2)
set(LIBYANG_MICRO_VERSION 0)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})

# set version of the library
set(LIBYANG_MAJOR_SOVERSION 5)
set(LIBYANG_MINOR_SOVERSION 5)
set(LIBYANG_MICRO_SOVERSION 5)
set(LIBYANG_MINOR_SOVERSION 7)
set(LIBYANG_MICRO_SOVERSION 0)
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})

Expand Down Expand Up @@ -149,6 +149,7 @@ set(libsrc
src/parser_yang.c
src/parser_yin.c
src/printer_schema.c
src/printer_sid.c
src/printer_yang.c
src/printer_yin.c
src/printer_tree.c
Expand Down Expand Up @@ -238,6 +239,7 @@ set(format_sources
src/*.h
src/plugins_exts/*
src/plugins_types/*)

#
# options
#
Expand Down Expand Up @@ -323,11 +325,30 @@ if(ENABLE_COVERAGE)
gen_coverage_enable(${ENABLE_TESTS})
endif()

find_package(CBOR)
if(CBOR_FOUND)
list(APPEND libsrc src/parser_cbor.c src/lcbor.c src/printer_cbor.c)
list(APPEND headers src/lcbor.h)
list(APPEND format_sources src/parser_cbor.c src/lcbor.h src/lcbor.c src/printer_cbor.c)
else()
message(STATUS "libcbor not found, CBOR support disabled")
endif()

if ("${BUILD_TYPE_UPPER}" STREQUAL "DEBUG")
# enable before adding tests to let them detect that format checking is available - one of the tests is format checking
source_format_enable(0.77)
endif()

if(ENABLE_FUZZ_TARGETS)
set(FUZZER "AFL" CACHE STRING "fuzzer type")
if(FUZZER STREQUAL "LibFuzzer")
if (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
message(FATAL_ERROR "LibFuzzer works only with clang")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address,undefined -fno-omit-frame-pointer")
endif()
endif()

# check regex compatibility
check_include_file("regex.h" LY_HAVE_REGEX_H)
if(LY_HAVE_REGEX_H)
Expand Down Expand Up @@ -427,6 +448,17 @@ find_package(PCRE2 10.21 REQUIRED)
include_directories(${PCRE2_INCLUDE_DIRS})
target_link_libraries(yang ${PCRE2_LIBRARIES})

# link libcbor if found
if(CBOR_FOUND)
if(TARGET yangobj)
target_compile_definitions(yangobj PRIVATE ENABLE_CBOR_SUPPORT)
target_include_directories(yangobj PRIVATE ${CBOR_INCLUDE_DIR})
endif()
target_compile_definitions(yang PRIVATE ENABLE_CBOR_SUPPORT)
target_include_directories(yang PRIVATE ${CBOR_INCLUDE_DIR})
target_link_libraries(yang ${CBOR_LIBRARY})
endif()

# XXHash include and library
find_package(XXHash)
if(XXHASH_FOUND)
Expand Down Expand Up @@ -477,16 +509,8 @@ endif()
if(ENABLE_TESTS)
enable_testing()
add_subdirectory(tests)
endif()

if(ENABLE_FUZZ_TARGETS)
set(FUZZER "AFL" CACHE STRING "fuzzer type")
if(FUZZER STREQUAL "LibFuzzer")
if (NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
message(FATAL_ERROR "LibFuzzer works only with clang")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address,undefined -fno-omit-frame-pointer")
endif()
elseif(ENABLE_FUZZ_TARGETS AND NOT WIN32)
add_subdirectory(tests/fuzz)
endif()

# create coverage target for generating coverage reports
Expand Down
37 changes: 37 additions & 0 deletions CMakeModules/FindCBOR.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Try to find libcbor
# Once done this will define
#
# Read-Only variables:
# CBOR_FOUND - system has libcbor
# CBOR_INCLUDE_DIR - the libcbor include directory
# CBOR_LIBRARY - Link these to use libcbor

find_path(CBOR_INCLUDE_DIR
NAMES
cbor.h
PATHS
/usr/include
/usr/local/include
/opt/local/include
/sw/include
${CMAKE_INCLUDE_PATH}
${CMAKE_INSTALL_PREFIX}/include
)

find_library(CBOR_LIBRARY
NAMES
cbor
libcbor
PATHS
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/local/lib
/sw/lib
${CMAKE_LIBRARY_PATH}
${CMAKE_INSTALL_PREFIX}/lib
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CBOR FOUND_VAR CBOR_FOUND REQUIRED_VARS CBOR_INCLUDE_DIR CBOR_LIBRARY)
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ as well as YANG 1.1 ([RFC 7950](https://tools.ietf.org/html/rfc7950)).
Binary RPM or DEB packages of the latest release can be built locally using `apkg`, look into `README` in
the `distro` directory.

### Mac OS

libyang & yanglint can be installed using [homebrew](https://brew.sh/) with ```brew install libyang``` (community maintained)

## Requirements

### Unix Build Requirements
Expand Down
Loading
Loading