Subject: Re: ifconfig breakage
To: enami tsugutomo <enami@sm.sony.co.jp>
From: Christos Zoulas <christos@zoulas.com>
List: current-users
Date: 03/07/2000 09:52:53
On Mar 7, 6:32pm, enami@sm.sony.co.jp (enami tsugutomo) wrote:
-- Subject: Re: ifconfig breakage
| christos@zoulas.com (Christos Zoulas) writes:
|
| > I understand. But what is the choice? Live with requiring COMPAT_43
| > forever?
|
| With a patch below, second or later `ifconfig wi0 inet 0.0.0.0' no
| longer gives an EAFNOSUPPORT (at least for me).
|
| When ifconfig adds an address, it first tries to delete existing one
| using deferent struct ifreq (or, xxx_ifreq depending on protocol) than
| the struct ifreq containing new address. And a sa_family of it
| doesn't initialized at all (though when the same struct ifreq is used
| to delete alias, it does).
|
| Comments?
Hmm, have to say that ifconfig is a good candidate for a re-write. I
cannot follow the control flow anymore :-(
| # BTW, IMHO, af_ridreq and af_addreq should be `struct ifreq *' or
| # `struct ifaliasreq *' rather than caddr_t and points union of ifreq
| # and xxx_ifreq etc, shouldn't they?
probably void * is the easiest change for now. There are too many (caddr_t)
casts in the ifconfig code that can be deleted (all the ones where the
third argument to ioctl is casted to caddr_t for example.
christos