NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/45675
The following reply was made to PR kern/45675; it has been noted by GNATS.
From: Miwa Susumu <miwarin%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/45675
Date: Tue, 7 Jul 2015 23:26:21 +0900
I just added the message.
By the way, it will be an error in FreeBSD "Invalid argument"
% diff -u sbin/ifconfig/af_inetany.c.orig sbin/ifconfig/af_inetany.c
--- sbin/ifconfig/af_inetany.c.orig 2015-07-07 22:58:36.000000000 +0900
+++ sbin/ifconfig/af_inetany.c 2015-07-07 23:08:10.000000000 +0900
@@ -89,8 +89,10 @@
if ((d = (prop_data_t)prop_dictionary_get(env, "address")) != NULL)
addr = prop_data_data_nocopy(d);
else if (!prop_dictionary_get_bool(env, "alias", &alias) || alias ||
- param->gifaddr.cmd == 0)
+ param->gifaddr.cmd == 0) {
+ err(EXIT_FAILURE, "Please set address");
return;
+ }
else if (prog_ioctl(s, param->gifaddr.cmd, param->dgreq.buf) == -1)
err(EXIT_FAILURE, "%s", param->gifaddr.desc);
else if (prog_ioctl(s, param->difaddr.cmd, param->dgreq.buf) == -1)
If we try to seriously deal.
'addr' is a fixed value(const). therefore once we set value to 'env',
and acquires its value.
following procedure.
1. get IF address.
2. create working prop_data_t .
3. add prop_data_t to dictionary 'env' (I do not know Is it possible.).
4. get prop_data_t from 'env' (This is because, env because it is a
fixed value)
5. set prop_data_t to 'addr'
--
miwarin
Home |
Main Index |
Thread Index |
Old Index