Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

babeld: Add MBZ and Reserved field checking #16735

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zmw12306
Copy link
Contributor

@zmw12306 zmw12306 commented Sep 3, 2024

according to RFC 8966:
https://www.rfc-editor.org/rfc/rfc8966.html#name-padn
PadN
PadN TLV: MBZ must be zero
PadN SubTLV: MBZ must be zero

according to RFC 8966:
Acknowledgment Request
IHU
Router-Id
Next Hop
Seqno Request

'Reserved' field should be sent as 0

@frrbot frrbot bot added the babel label Sep 3, 2024
@github-actions github-actions bot added master size/S rebase PR needs rebase labels Sep 3, 2024
@@ -144,7 +144,12 @@ static bool parse_update_subtlv(const unsigned char *a, int alen,
"Received Mandatory bit set but this FRR version is not prepared to handle it at this point");
return true;
} else if (type == SUBTLV_PADN) {
/* Nothing. */
for (int j = 0; j < len; j++) {
if (a[i + j + 2] != 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please no magic values. Please go through the entire commit and fix the magic values to a define.

Copy link
Member

@donaldsharp donaldsharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix magic values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants