Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 1996 17:28:29 -0700
From:      "Jin Guojun[ITG]" <jin@george.lbl.gov>
To:        bugs@freefall.freebsd.org, dima@satty.npi.msu.su, fenner@freefall.freebsd.org, hsu@clinet.fi
Subject:   Re: Partial fix for panic in arpresolve() (kern/1140, kern/1325)
Message-ID:  <199606180028.RAA25357@george.lbl.gov>

next in thread | raw e-mail | index | archive | help
I think we are OK to use the new arpcom struct without ac_ipaddr member.
Here is the new patch I tested for a while. Please confirm it work no flaw.

Thanks,

	-Jin

------------------------- New patch ---------------------------------------
*** netinet/if_ether.c  Sat Jun  8 01:18:56 1996
--- netinet/if_ether.c.fixed    Mon Jun 17 17:07:10 1996
***************
*** 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)
!                               : &(SIN(rt->rt_ifa->ifa_addr)->sin_addr.s_addr),
                                &(SIN(dst)->sin_addr.s_addr),
                                ac->ac_enaddr);
                        else {
----------------------------------------------------------------------------
****************** following is the original message **********************

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;
        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?199606180028.RAA25357>