Merge "net-tools: add debian package"

This commit is contained in:
Zuul 2021-12-08 12:26:23 +00:00 committed by Gerrit Code Review
commit 11e959d3b8
4 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,5 @@
debver: 1.60+git20181103.0eebece-1
archive: https://snapshot.debian.org/archive/debian/20210529T084123Z/pool/main/n/net-tools
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true

View File

@ -0,0 +1,36 @@
From 142ae27a708465920db6280fb7f89138a48e4cd1 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 16:42:24 -0400
Subject: [PATCH] net-tools: hostname ipv6 shortname
These are not supported for IPv6 so just consume the option
and return the default hostname value
Signed-off-by: Scott Little <scott.little@windriver.com>
Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
---
hostname.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hostname.c b/hostname.c
index 34e4ac7..fd3c5cb 100644
--- a/hostname.c
+++ b/hostname.c
@@ -344,8 +344,13 @@ int main(int argc, char **argv)
break;
case 'a':
case 'f':
- case 'i':
case 's':
+ /*
+ * These are not supported for IPv6 so just consume the option
+ * and return the default hostname value
+ */
+ break;
+ case 'i':
what = 1;
type = c;
break;
--
2.25.1

View File

@ -0,0 +1,32 @@
From 2467301a909ac9648d2903166edcac9badc510af Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 16:42:25 -0400
Subject: [PATCH] net-tools: ifconfig no ifstate on flush
do not continue to change interface state if only flushing addresses
Signed-off-by: Scott Little <scott.little@windriver.com>
Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
---
ifconfig.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ifconfig.c b/ifconfig.c
index 7c62d85..06092ed 100644
--- a/ifconfig.c
+++ b/ifconfig.c
@@ -983,6 +983,11 @@ int main(int argc, char **argv)
exit(1);
}
r = ioctl(fd, SIOCSIFADDR, &ifr);
+ if (((struct sockaddr_in*)&sa)->sin_addr.s_addr == INADDR_ANY) {
+ /* do not continue to change interface state if only flushing addresses */
+ spp++;
+ continue;
+ }
break;
#endif
#if HAVE_AFECONET
--
2.25.1

View File

@ -0,0 +1,2 @@
net-tools-hostname-ipv6-shortname.patch
net-tools-ifconfig-no-ifstate-on-flush.patch