net-tools: add debian package

Porting 2 patches from Centos

net-tools-hostname-ipv6-shortname.patch
net-tools-ifconfig-no-ifstate-on-flush.patch

Update the shortname of the patches.

Ignore fix-compile-error-with-4.18-kernel.patch,
since Bullseye's kernel is upper 5.10.

BTW, not using the tar ball:
net-tools-debian-1.60+git20181103.0eebece-1.tar.gz,

which misses a patch
Bug_549397-fix-decoding-of-MII-vendor-ids.patch

Test Plan: building, install and booting

Pass: build test
Pass: install image
Pass: boot up on qemu

Story: 2009221
Task: 44052

Signed-off-by: Yue Tao <yue.tao@windriver.com>
Change-Id: If163f8129e880bfc2a68e406b840c42f12df931e
This commit is contained in:
Yue Tao 2021-11-24 14:15:44 +08:00
parent bba2bc0ace
commit 27398cdcf7
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