aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenlei Huang <zlei@FreeBSD.org>2023-04-07 14:25:41 +0000
committerZhenlei Huang <zlei@FreeBSD.org>2023-04-07 14:25:41 +0000
commit09e5e3d598604167c1fb05e5cd0f41ed83314517 (patch)
tree77a94216177d63c50929feffe9c3f59ac1482980
parent945f9a7cc9dcc071bfcc702748fbbb11087ae773 (diff)
downloadsrc-09e5e3d598604167c1fb05e5cd0f41ed83314517.tar.gz
src-09e5e3d598604167c1fb05e5cd0f41ed83314517.zip
ifconfig: Fix configuring if_bridge with additional operating parameters
For clone create and rename operations, the interface name get back can be different from the one passed to ioctl(). Use the interface name we get back so that ifconfig will not return unexpected ENXIO. PR: 270618 Reviewed by: kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39396
-rw-r--r--sbin/ifconfig/ifbridge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifbridge.c b/sbin/ifconfig/ifbridge.c
index 2bd9c96f2489..3a78b068eb5d 100644
--- a/sbin/ifconfig/ifbridge.c
+++ b/sbin/ifconfig/ifbridge.c
@@ -91,7 +91,7 @@ do_cmd(int sock, u_long op, void *arg, size_t argsize, int set)
memset(&ifd, 0, sizeof(ifd));
- strlcpy(ifd.ifd_name, ifr.ifr_name, sizeof(ifd.ifd_name));
+ strlcpy(ifd.ifd_name, name, sizeof(ifd.ifd_name));
ifd.ifd_cmd = op;
ifd.ifd_len = argsize;
ifd.ifd_data = arg;