ifconfig: fix gre(4) status

Set `ifr->ifr_name` to display gre options
for the interface.

Reviewed by: glebius, zlei
Approved by: glebius (mentor)
MFC after: 1 day
Differential Revision: https://reviews.freebsd.org/D55099
This commit is contained in:
Pouria Mousavizadeh Tehrani
2026-02-04 14:33:22 +03:30
parent a3ff85e119
commit c2ba906fa6
+2 -2
View File
@@ -53,11 +53,11 @@ gre_status(if_ctx *ctx)
uint32_t opts = 0, port;
struct ifreq ifr = { .ifr_data = (caddr_t)&opts };
if (ioctl_ctx(ctx, GREGKEY, &ifr) == 0)
if (ioctl_ctx_ifr(ctx, GREGKEY, &ifr) == 0)
if (opts != 0)
printf("\tgrekey: 0x%x (%u)\n", opts, opts);
opts = 0;
if (ioctl_ctx(ctx, GREGOPTS, &ifr) != 0 || opts == 0)
if (ioctl_ctx_ifr(ctx, GREGOPTS, &ifr) != 0 || opts == 0)
return;
port = 0;