summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Popelka <jpopelka@redhat.com>2011-12-07 19:14:09 +0100
committerJiri Popelka <jpopelka@redhat.com>2012-01-05 12:22:43 +0100
commit81814dc2b14843009193efd307d814c26baa61f0 (patch)
tree3a3fc6a6371b6fa5c938cbffce3b4116eff34691
parent796ba7f1e59883a85558996ea7785054ae45aac0 (diff)
downloadnet-tools-81814dc2b14843009193efd307d814c26baa61f0.tar.gz
net-tools-81814dc2b14843009193efd307d814c26baa61f0.tar.bz2
net-tools-81814dc2b14843009193efd307d814c26baa61f0.zip
ifconfig interface:0 del <IP> will remove the aliased IP on IA64
-rw-r--r--ifconfig.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ifconfig.c b/ifconfig.c
index bc405c6..dae8922 100644
--- a/ifconfig.c
+++ b/ifconfig.c
@@ -890,7 +890,9 @@ int main(int argc, char **argv)
continue;
}
- memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long));
+ /* Clear "ip" in case sizeof(unsigned long) > sizeof(sin.sin_addr.s_addr) */
+ ip = 0;
+ memcpy(&ip, &sin.sin_addr.s_addr, sizeof(sin.sin_addr.s_addr));
if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) {
fprintf(stderr, _("Interface %s not initialized\n"),