]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
06f81420e975ec55fa7e93e96178592dcfe61d31
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From 81814dc2b14843009193efd307d814c26baa61f0 Mon Sep 17 00:00:00 2001
2 From: Jiri Popelka <jpopelka@redhat.com>
3 Date: Wed, 7 Dec 2011 19:14:09 +0100
4 Subject: [PATCH] ifconfig interface:0 del <IP> will remove the aliased IP on IA64
5
6 Upstream-Status: Backport
7
8 commit 81814dc2b14843009193efd307d814c26baa61f0 from
9 git://git.code.sf.net/p/net-tools/code
10
11 ---
12 ifconfig.c | 4 +++-
13 1 file changed, 3 insertions(+), 1 deletion(-)
14
15 diff --git a/ifconfig.c b/ifconfig.c
16 index bc405c6..dae8922 100644
17 --- a/ifconfig.c
18 +++ b/ifconfig.c
19 @@ -890,7 +890,9 @@ int main(int argc, char **argv)
20 continue;
21 }
22
23 - memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long));
24 + /* Clear "ip" in case sizeof(unsigned long) > sizeof(sin.sin_addr.s_addr) */
25 + ip = 0;
26 + memcpy(&ip, &sin.sin_addr.s_addr, sizeof(sin.sin_addr.s_addr));
27
28 if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) {
29 fprintf(stderr, _("Interface %s not initialized\n"),
30 --
31 1.7.9.5
32