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

[change] Status: if bridge member is not present as interface, remove it #83

Open
nemesifier opened this issue Apr 7, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@nemesifier
Copy link
Member

nemesifier commented Apr 7, 2022

When collecting device status from OpenWrt, the bridge member list may include members of interfaces which are not active.

Before adding the interface to the bridge members, it would be great to ensure the interface is present and active.

@nemesifier nemesifier added the enhancement New feature or request label Apr 7, 2022
@devkapilbansal
Copy link
Member

devkapilbansal commented Jul 21, 2022

Hi @nemesisdesign,
I think this issue is already taken care of in the past here

-- add existing bridge members only
if interface['bridge-members'] ~= nil then
local bridge_members = {}
for _, bridge_member in ipairs(interface['bridge-members']) do
if network_status[bridge_member] then
local network_interface = network_status[bridge_member]
if network_interface.up and network_interface.present then
table.insert(bridge_members, bridge_member)
end
end
end
netjson_interface['bridge_members'] = bridge_members

@nemesifier
Copy link
Member Author

@devkapilbansal looks you're right, I am not sure why I created this then, let's leave it open for some more time and if I can't see this issue anymore at all I will close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To do (general)
Development

No branches or pull requests

2 participants