Subject: Re: arping for 127.0.0.1
To: Wolfgang Rupprecht <wolfgang@wsrcc.com>
From: Dennis Ferguson <dennis@juniper.net>
List: tech-net
Date: 06/15/1998 11:17:29
> Should this whole clump perhaps be changed to the following???
> 
> 	IFP_TO_IA(ifp, ia);
> 		if (ia == NULL) goto out;

This would be better, but it breaks if you have more than one address
configured on the interface since that macro stops at the first ifaddr
it finds.  It really needs something closer to

	INADDR_TO_IA(itaddr, ia);
	if (ia == NULL) {
		IFP_SUBNET_TO_IA(ifp, itaddr, ia);
		if (ia == NULL)
			goto out;
	} else if (ia->ia_ifp != ifp)
		goto out;

where IFP_SUBNET_TO_IA() returns an ifaddr whose subnet matches `itaddr'.
This would better handle the multiple-interface-addresses case, as well
as the two-interfaces-on-the-same-wire case.

Dennis Ferguson