Repository navigation
tree data FEATURE notification envelope detection - #2630
Merged
Merged
Conversation
michalvasko
requested changes
Nov 11, 2026
michalvasko
left a comment
Member
There was a problem hiding this comment.
Looks fine, just fix the version conflicts, please.
michalvasko
approved these changes
Nov 11, 2026
michalvasko
force-pushed
the
yp-notif-auto
branch
from
November 12, 2026 07:37
d09c0e1 to
e50b934
Compare
The message parsers also read the NETCONF and RESTCONF envelopes, so name the internal flag after the YANG-Push envelope it stands for.
A UDP-Notif collector learns only the encoding of a notification, not its envelope, and had to sniff the root element itself to choose the data type. LYD_TYPE_NOTIF_AUTO parses a notification in the YANG-Push envelope or in the NETCONF/RESTCONF one. The message parsers decide by the root element they read first anyway, so the input is not tokenized and CBOR not decoded twice. The 'ietf-yp-notification' module is required only once its envelope is found. LYD_TYPE_NOTIF_ENVELOPE goes through the same message parsers with the detection skipped, so both types share one envelope path.
The JSON parser backup kept the input position but not its line, so newlines read before a restore were counted twice and every later error reported a line too far. LYD_TYPE_NOTIF_AUTO detection peeks at the first member this way.
Roytak
force-pushed
the
yp-notif-auto
branch
from
November 12, 2026 07:43
e50b934 to
21a78d9
Compare
michalvasko
marked this pull request as draft
November 12, 2026 07:47
michalvasko
marked this pull request as ready for review
November 12, 2026 08:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
LYD_TYPE_NOTIF_AUTOtolyd_parse_op(), which parses a notification in either the YANG-Push envelope of draft-ietf-netconf-notif-envelope or the NETCONF/RESTCONF one, detected from the input.Also fixes JSON parser error messages reporting a wrong line number after the parser looked ahead in the input.