Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 1996 17:08:12 -0700 (PDT)
From:      Bill Fenner <fenner>
To:        bugs, dima@satty.npi.msu.su, fenner, hsu@clinet.fi, jin@george.lbl.gov
Subject:   Partial fix for panic in arpresolve() (kern/1140, kern/1325)
Message-ID:  <199606180008.RAA10964@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
Folks,

  Sorry that this has taken so long.  Thanks very much to Jin Guojun for
the idea.  This is not the fix that I (or CSRG) eventaully intended, but
should make things at least work for now.  Could you try this patch to
FreeBSD-current and see if it fixes your problems?  It is basically Jin's
fix with the reinstantiation of the ac_ipaddr member of struct arpcom.

Thanks,
  Bill

Index: if_ether.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/if_ether.c,v
retrieving revision 1.31
diff -c -r1.31 if_ether.c
*** if_ether.c	1996/06/13 02:54:19	1.31
--- if_ether.c	1996/06/17 23:59:54
***************
*** 364,371 ****
  		if (la->la_asked == 0 || rt->rt_expire != time.tv_sec) {
  			rt->rt_expire = time.tv_sec;
  			if (la->la_asked++ < arp_maxtries)
! 			    arprequest(ac,
! 				&(SIN(rt0->rt_ifa->ifa_addr)->sin_addr.s_addr),
  				&(SIN(dst)->sin_addr.s_addr),
  				ac->ac_enaddr);
  			else {
--- 364,372 ----
  		if (la->la_asked == 0 || rt->rt_expire != time.tv_sec) {
  			rt->rt_expire = time.tv_sec;
  			if (la->la_asked++ < arp_maxtries)
! 			    arprequest(ac, rt0 ?
! 				&(SIN(rt0->rt_ifa->ifa_addr)->sin_addr.s_addr) :
! 				&ac->ac_ipaddr.s_addr,
  				&(SIN(dst)->sin_addr.s_addr),
  				ac->ac_enaddr);
  			else {
***************
*** 626,631 ****
--- 627,633 ----
  	struct arpcom *ac;
  	struct ifaddr *ifa;
  {
+ 	ac->ac_ipaddr = IA_SIN(ifa)->sin_addr;
  	arprequest(ac, &(IA_SIN(ifa)->sin_addr.s_addr),
  		       &(IA_SIN(ifa)->sin_addr.s_addr), ac->ac_enaddr);
  	ifa->ifa_rtrequest = arp_rtrequest;
Index: if_ether.h
===================================================================
RCS file: /home/ncvs/src/sys/netinet/if_ether.h,v
retrieving revision 1.14
diff -c -r1.14 if_ether.h
*** if_ether.h	1996/03/23 01:32:30	1.14
--- if_ether.h	1996/06/17 23:59:59
***************
*** 120,125 ****
--- 120,126 ----
  	 */
  	struct 	ifnet ac_if;		/* network-visible interface */
  	u_char	ac_enaddr[6];		/* ethernet hardware address */
+ 	struct	in_addr ac_ipaddr;	/* copy of ip address- XXX */
  	struct	ether_multi *ac_multiaddrs; /* list of ether multicast addrs */
  	int	ac_multicnt;		/* length of ac_multiaddrs list */
  };



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606180008.RAA10964>