null pointer bug from Leres
[unix-history] / usr / src / sys / netinet / if_ether.c
index 67880d6..aaf8e8d 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)if_ether.c  7.22 (Berkeley) %G%
+ *     @(#)if_ether.c  7.23 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -441,9 +441,10 @@ reply:
                la = arplookup(itaddr.s_addr, 0, SIN_PROXY);
                if (la == NULL)
                        goto out;
                la = arplookup(itaddr.s_addr, 0, SIN_PROXY);
                if (la == NULL)
                        goto out;
+               rt = la->la_rt;
                bcopy((caddr_t)ea->arp_sha, (caddr_t)ea->arp_tha,
                    sizeof(ea->arp_sha));
                bcopy((caddr_t)ea->arp_sha, (caddr_t)ea->arp_tha,
                    sizeof(ea->arp_sha));
-               sdl = SDL(la->la_rt->rt_gateway);
+               sdl = SDL(rt->rt_gateway);
                bcopy(LLADDR(sdl), (caddr_t)ea->arp_sha, sizeof(ea->arp_sha));
                sendtrailers = rt->rt_flags & RTF_USETRAILERS;
        }
                bcopy(LLADDR(sdl), (caddr_t)ea->arp_sha, sizeof(ea->arp_sha));
                sendtrailers = rt->rt_flags & RTF_USETRAILERS;
        }