diff options
author | Daniel Golle <daniel@makrotopia.org> | 2020-04-14 12:51:47 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2020-04-14 12:57:17 +0100 |
commit | cfccdc22ca6d8f28d70a2546a495c9ead4bbb765 (patch) | |
tree | 645cd82dc16395007b6993a0537801f654fb9611 /system-dummy.c | |
parent | dbf97b47a53809a6ff812d4466d2082aa4d3efb6 (diff) |
interface, system: clean up netns functionality
Use struct device pointer as parameter instead of bare ifname allows
for some simplication and again removing system_ifname_resolve()
function introduced in commit d93126d.
Fixes: d93126d ("interface: allow renaming interface when moving to jail netns")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'system-dummy.c')
-rw-r--r-- | system-dummy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system-dummy.c b/system-dummy.c index 2669a34..ab1a1b2 100644 --- a/system-dummy.c +++ b/system-dummy.c @@ -54,9 +54,9 @@ int system_bridge_delif(struct device *bridge, struct device *dev) return 0; } -int system_link_netns_move(const char *ifname, int netns_fd, const char *target_ifname) +int system_link_netns_move(struct device *dev, int netns_fd, const char *target_ifname) { - D(SYSTEM, "ip link dev %s name %s netns %d\n", ifname, target_ifname, netns_fd); + D(SYSTEM, "ip link set %s name %s netns %d\n", dev->ifname, target_ifname, netns_fd); return 0; } |