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

Misc fixes #679

Merged
merged 12 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .github/workflows/add-issue-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Adds all issues to project Infix & C:o

on:
issues:
types:
- opened

jobs:
add-to-project:
name: Add issue to project Infix&co
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v1.0.2
mattiaswal marked this conversation as resolved.
Show resolved Hide resolved
with:
project-url: https://github.com/orgs/kernelkit/projects/3
github-token: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions doc/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ Change Log

All notable changes to the project are documented in this file.

[v24.10.0][] - UNRELEASED
-------------------------
### Changes
- OSPF: Add limitation to only allow one interface per area.

### Fixes
- Fix #499 by adding a NACM rule to factory config, which by default
deny everyone to read the user password hash.
- Fix BFD in OSPF, previously you could not enable BFD on a single
interface without it was enabled on all interfaces.

[v24.09.0][] - 2024-09-30
-------------------------
Expand Down
14 changes: 14 additions & 0 deletions src/confd/share/factory.d/10-nacm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"ietf-netconf-acm:nacm": {
"enable-nacm": true,
mattiaswal marked this conversation as resolved.
Show resolved Hide resolved
"groups": {
"group": [
{
Expand All @@ -25,6 +26,19 @@
"comment": "Allow 'admin' group complete access to all operations and data."
}
]
},
{
"name": "default-deny-all",
"group": ["*"],
"rule": [
{
"name": "deny-password-read",
"module-name": "ietf-system",
"path": "/ietf-system:system/authentication/user/password",
"access-operations": "*",
"action": "deny"
mattiaswal marked this conversation as resolved.
Show resolved Hide resolved
}
]
}
]
}
Expand Down
10 changes: 6 additions & 4 deletions src/confd/src/ietf-routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ log facility local2\n"
int parse_ospf_interfaces(sr_session_ctx_t *session, struct lyd_node *areas, FILE *fp)
{
struct lyd_node *interface, *interfaces, *area;
int bfd_enabled = 0;
int num_bfd_enabled = 0;

LY_LIST_FOR(lyd_child(areas), area) {
const char *area_id;
Expand All @@ -41,11 +41,13 @@ int parse_ospf_interfaces(sr_session_ctx_t *session, struct lyd_node *areas, FIL
const char *hello, *dead, *retransmit, *transmit, *interface_type, *cost;

if (lydx_get_bool(interface, "enabled")) {
int passive = 0, bfd_enabled = 0;
struct lyd_node *bfd;
int passive = 0;

bfd = lydx_get_child(interface, "bfd");
bfd_enabled += lydx_get_bool(bfd, "enabled");
bfd_enabled = lydx_get_bool(bfd, "enabled");
num_bfd_enabled += bfd_enabled;

passive = lydx_get_bool(interface, "passive");
fprintf(fp, "interface %s\n", lydx_get_cattr(interface, "name"));

Expand Down Expand Up @@ -77,7 +79,7 @@ int parse_ospf_interfaces(sr_session_ctx_t *session, struct lyd_node *areas, FIL
}
}

return bfd_enabled;
return num_bfd_enabled;
}

int parse_ospf_redistribute(sr_session_ctx_t *session, struct lyd_node *redistributes, FILE *fp)
Expand Down
2 changes: 1 addition & 1 deletion src/confd/yang/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
yangdir = $(YANGDIR)
yang_DATA = $(wildcard *.yang)
yang_DATA = $(wildcard *@*.yang) ieee802-types.yang ieee802-dot1ab-types.yang
2 changes: 1 addition & 1 deletion src/confd/yang/confd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ MODULES=(
"ieee802-dot1q-types@2022-10-29.yang"
"infix-ip@2024-09-16.yang"
"infix-if-type@2024-01-29.yang"
"infix-routing@2024-09-23.yang"
"infix-routing@2024-10-01.yang"
"ieee802-dot1ab-lldp@2022-03-15.yang"
"infix-lldp@2023-08-23.yang"
"infix-dhcp-client@2024-09-20.yang"
Expand Down
Loading