1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Babel: Parse sub-TLVs and skip TLVs with mandatory sub-TLV

RFC6126bis formally introduces sub-TLVs to the Babel protocol, including
mandatory sub-TLVs. This adds support for parsing sub-TLVs to the Babel
protocol and skips TLVs that contain mandatory sub-TLVs, as per the spec.

For details, see section 4.4 of
https://tools.ietf.org/html/draft-ietf-babel-rfc6126bis-02

Thanks to Toke Høiland-Jørgensen <toke@toke.dk> for the patch.
This commit is contained in:
Ondrej Zajicek (work)
2017-06-09 14:33:06 +02:00
parent b3c6273efa
commit 145ebfa1df
2 changed files with 79 additions and 4 deletions

View File

@@ -78,6 +78,11 @@ enum babel_tlv_type {
BABEL_TLV_MAX
};
enum babel_subtlv_type {
BABEL_SUBTLV_PAD1 = 0,
BABEL_SUBTLV_PADN = 1
};
enum babel_iface_type {
/* In practice, UNDEF and WIRED give equivalent behaviour */
BABEL_IFACE_TYPE_UNDEF = 0,