Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/netinet pullup 1.56->1.57 (is)



details:   https://anonhg.NetBSD.org/src/rev/09c05f8a5aa3
branches:  netbsd-1-4
changeset: 468637:09c05f8a5aa3
user:      perry <perry%NetBSD.org@localhost>
date:      Tue May 04 20:01:32 1999 +0000

description:
pullup 1.56->1.57 (is)

diffstat:

 sys/netinet/if_arp.c |  22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r 6ce13453b077 -r 09c05f8a5aa3 sys/netinet/if_arp.c
--- a/sys/netinet/if_arp.c      Tue May 04 17:28:30 1999 +0000
+++ b/sys/netinet/if_arp.c      Tue May 04 20:01:32 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_arp.c,v 1.56 1999/03/22 22:30:42 bad Exp $  */
+/*     $NetBSD: if_arp.c,v 1.56.2.1 1999/05/04 20:01:32 perry Exp $    */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -592,10 +592,22 @@
        la = arplookup(&isaddr, in_hosteq(itaddr, myaddr), 0);
        if (la && (rt = la->la_rt) && (sdl = SDL(rt->rt_gateway))) {
                if (sdl->sdl_alen &&
-                   bcmp((caddr_t)ar_sha(ah), LLADDR(sdl), sdl->sdl_alen))
-                       log(LOG_INFO, "arp info overwritten for %s by %s\n",
-                           in_fmtaddr(isaddr),
-                           lla_snprintf(ar_sha(ah), ah->ar_hln));
+                   bcmp((caddr_t)ar_sha(ah), LLADDR(sdl), sdl->sdl_alen)) {
+                       if (rt->rt_ifp != ifp) {
+                               log(LOG_INFO,
+                                   "%s on %s tried to overwrite "
+                                   "arp info for %s on %s\n",
+                                   lla_snprintf(ar_sha(ah), ah->ar_hln),
+                                   ifp->if_xname, in_fmtaddr(isaddr),
+                                   rt->rt_ifp->if_xname);
+                                   goto out;
+                       } else {
+                               log(LOG_INFO,
+                                   "arp info overwritten for %s by %s\n",
+                                   in_fmtaddr(isaddr),
+                                   lla_snprintf(ar_sha(ah), ah->ar_hln));
+                       }
+               }
                /* 
                 * sanity check for the address length.
                 * XXX this does not work for protocols with variable address



Home | Main Index | Thread Index | Old Index