okda-networks / tc-acls-sysrepo-plugin

Linux TC sysrepo plugin
GNU General Public License v3.0
3 stars 0 forks source link

tcnl does not refersh the `link_cache` on each call. #39

Closed Ali-aqrabawi closed 8 months ago

Ali-aqrabawi commented 9 months ago

if i run the plugin and then create a new interface, the plugin will fail if any acl attached to the newly created interface.

make sure link_cache is refersh/put after each call.

Ali-aqrabawi commented 9 months ago
[INF] ONM-TC-ACLs: Changes on xpath /ietf-access-control-list:acls/attachment-points/interface
node name name, node value test2
interface name onm_tc_dev2 grand parent name ingress, acl_name name
[INF] ONM-TC-ACLs: Changes on xpath /ietf-access-control-list:acls/attachment-points/interface
[INF] ONM-TC-ACLs: + attachment-points: 
[INF] ONM-TC-ACLs: |    + interface onm_if8: 
[INF] ONM-TC-ACLs: |    |       interface-id = onm_if8
[INF] ONM-TC-ACLs: |    |       +egress:
[INF] ONM-TC-ACLs: |    |       |---- ACL Name: test2 (change operation 0)
[INF] ONM-TC-ACLs: |    + interface onm_tc_dev2: 
[INF] ONM-TC-ACLs: |    |       interface-id = onm_tc_dev2
[INF] ONM-TC-ACLs: |    |       +ingress:
[INF] ONM-TC-ACLs: |    |       |---- ACL Name: test2 (change operation 0)
[INF] ONM-TC-ACLs: |    |       +egress:
[INF] ONM-TC-ACLs: |    |       |---- ACL Name: test2 (change operation 0)
[ERR] srpc: /home/ali/CLionProjects/xain/DentOS/okda/onm-tc-acls/src/plugin/api/attachment-points/attachment_points_change.c:47 rtnl_link_get_by_name(nl_ctx->link_cache, interface_id) error (NULL)
[ERR] ONM-TC-ACLs: Attachment points change failed -1
[INF] EV LISTEN: "ietf-access-control-list" "change" ID 4 priority 0 fail (remaining 1 subscribers).