I haven't seen these in the wild, but happened to be dealing with the
corresponding header file and realized they were missing here.

IFF_LOWER_UP and IFF_DORMANT were added in Linux 2.6.17, and IFF_ECHO
in Linux 2.6.25.

(I haven't done anything about the missing bounds check here, nor trying
to show any unknown flags in hex or anything.)
---
 toys/net/ifconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
From ddd6348b84070307ebf1810a17a670e86674e1f8 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <e...@google.com>
Date: Wed, 3 Jan 2024 11:31:37 -0800
Subject: [PATCH] ifconfig: add missing flags.

I haven't seen these in the wild, but happened to be dealing with the
corresponding header file and realized they were missing here.

IFF_LOWER_UP and IFF_DORMANT were added in Linux 2.6.17, and IFF_ECHO
in Linux 2.6.25.

(I haven't done anything about the missing bounds check here, nor trying
to show any unknown flags in hex or anything.)
---
 toys/net/ifconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toys/net/ifconfig.c b/toys/net/ifconfig.c
index ec0bca2b..63e7a0ae 100644
--- a/toys/net/ifconfig.c
+++ b/toys/net/ifconfig.c
@@ -244,7 +244,7 @@ static void display_ifconfig(char *name, int always, unsigned long long val[])
     char **s, *str[] = {
       "UP", "BROADCAST", "DEBUG", "LOOPBACK", "POINTOPOINT", "NOTRAILERS",
       "RUNNING", "NOARP", "PROMISC", "ALLMULTI", "MASTER", "SLAVE", "MULTICAST",
-      "PORTSEL", "AUTOMEDIA", "DYNAMIC", NULL
+      "PORTSEL", "AUTOMEDIA", "DYNAMIC", "LOWER_UP", "DORMANT", "ECHO", NULL
     };
 
     for (s = str; *s; s++) {
-- 
2.43.0.472.g3155946c3a-goog

_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to