The branch main has been updated by bz:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=1313f1c2a35f7dbaba1b2948d2f0c4a1f4113f67

commit 1313f1c2a35f7dbaba1b2948d2f0c4a1f4113f67
Author:     Bjoern A. Zeeb <b...@freebsd.org>
AuthorDate: 2025-04-22 20:08:20 +0000
Commit:     Bjoern A. Zeeb <b...@freebsd.org>
CommitDate: 2025-06-09 21:44:25 +0000

    ifconfig: 802.11: decode RSNXE IE
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
    Reviewed by:    adrian
    Differential Revision: https://reviews.freebsd.org/D50675
---
 sbin/ifconfig/ifieee80211.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
index d08b5c861c76..2f79f2e92e60 100644
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -3212,6 +3212,33 @@ printrsnie(if_ctx *ctx, const char *tag, const u_int8_t 
*ie, size_t ielen)
        }
 }
 
+static void
+printrsnxe(if_ctx *ctx, const char *tag, const u_int8_t *ie, size_t ielen)
+{
+       size_t n;
+
+       printf("%s", tag);
+       if (!ctx->args->verbose)
+               return;
+
+       ie += 2, ielen -= 2;
+
+       n = (*ie & 0x0f);
+       printf("<%zu", n + 1);
+
+       /* We do not yet know about more than n=1 (0). */
+       if (n != 0)
+               goto end;
+
+       if (*ie & 0x10)
+               printf(" PTWTOPS");
+       if (*ie & 0x20)
+               printf(" SAE h-t-e");
+
+end:
+       printf(">");
+}
+
 #define BE_READ_2(p)                                   \
        ((u_int16_t)                                    \
         ((((const u_int8_t *)(p))[1]      ) |          \
@@ -3620,6 +3647,7 @@ iename(int elemid)
        case IEEE80211_ELEMID_TPC:      return " TPC";
        case IEEE80211_ELEMID_CCKM:     return " CCKM";
        case IEEE80211_ELEMID_EXTCAP:   return " EXTCAP";
+       case IEEE80211_ELEMID_RSN_EXT:  return " RSNXE";
        }
        snprintf(iename_buf, sizeof(iename_buf), " UNKNOWN_ELEMID_%d",
            elemid);
@@ -3703,6 +3731,9 @@ printies(if_ctx *ctx, const u_int8_t *vp, int ielen, 
unsigned int maxcols)
                case IEEE80211_ELEMID_APCHANREP:
                        printapchanrep(ctx, " APCHANREP", vp, 2+vp[1]);
                        break;
+               case IEEE80211_ELEMID_RSN_EXT:
+                       printrsnxe(ctx, " RSNXE", vp, 2+vp[1]);
+                       break;
                default:
                        if (verbose)
                                printie(ctx, iename(vp[0]), vp, 2+vp[1], 
maxcols);

Reply via email to