Skip to content

Commit

Permalink
fix(ip): Fix panic while parse IFLA_MASTER
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Jan 16, 2024
1 parent 6fc97a3 commit c07b86b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ function link.get(dev)
end

if attrs[rtnl.IFLA_MASTER] then
local idx = nl.attr_get_str(attrs[rtnl.IFLA_MASTER])
local idx = nl.attr_get_u32(attrs[rtnl.IFLA_MASTER])
res.master = socket.if_indextoname(idx)
end

Expand Down

0 comments on commit c07b86b

Please sign in to comment.