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

working l2vlan sub-interface #49

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

wungad
Copy link

@wungad wungad commented Jun 19, 2023

This PR adds a working functionality when dealing with iana:l2vlan interface types. It requires that parent-interface exists and that it references an existing entry in the ietf-interfaces:intefaces list.

Without the change, interface plugin fails when doing the initial load:

[INF] ietf-interfaces-plugin: Loading initial system data
[ERR] Mandatory node "parent-interface" instance does not exist. (Schema location "/ietf-interfaces:interfaces/interface/ietf-if-extensions:parent-interface".)
[ERR] Validation failed.
[ERR] ietf-interfaces-plugin: sr_apply_changes() error (9): Validation failed
[ERR] srpc: /src/sysrepo-plugin-interfaces/src/interfaces/src/plugin.c:310 interfaces_running_load(ctx, running_session) error (-1)
[ERR] ietf-interfaces-plugin: Error occured while initializing the plugin (-1)
[ERR] sysrepo-plugind: Plugin "libsrplg-ietf-interfaces" initialization failed (User callback failed).
[INF] No datastore changes to apply.

This PR also makes it possible to add/change/remove ipv4/ipv6 routes using the routing plugin.

Note:
The issue doesn't affect setups that do not use iana:l2vlan (e.g. eth0.231) type interfaces and so could not be detected until now.

wungad added 4 commits June 19, 2023 13:14
load.c: interfaces_interface_load_parent_interface
load.h: interfaces_interface_load_parent_interface
call the new function in two places:
- src/interfaces/src/plugin/api/interfaces/load.c
- src/interfaces/src/plugin/data/interfaces/interface.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant