Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet set ar_hrd for RFC-defined cases



details:   https://anonhg.NetBSD.org/src/rev/a71e0a9794fc
branches:  trunk
changeset: 533202:a71e0a9794fc
user:      itojun <itojun%NetBSD.org@localhost>
date:      Mon Jun 24 08:42:33 2002 +0000

description:
set ar_hrd for RFC-defined cases

diffstat:

 sys/netinet/if_arp.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r a09b86ef001b -r a71e0a9794fc sys/netinet/if_arp.c
--- a/sys/netinet/if_arp.c      Mon Jun 24 08:11:30 2002 +0000
+++ b/sys/netinet/if_arp.c      Mon Jun 24 08:42:33 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_arp.c,v 1.82 2002/06/24 08:06:22 itojun Exp $       */
+/*     $NetBSD: if_arp.c,v 1.83 2002/06/24 08:42:33 itojun Exp $       */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.82 2002/06/24 08:06:22 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.83 2002/06/24 08:42:33 itojun Exp $");
 
 #include "opt_ddb.h"
 #include "opt_inet.h"
@@ -632,7 +632,12 @@
        ah = mtod(m, struct arphdr *);
        bzero((caddr_t)ah, m->m_len);
        switch (ifp->if_type) {
-       case IFT_IEEE1394:
+       case IFT_ETHER:         /* RFC826 */
+       case IFT_FDDI:          /* RFC1390 */
+       case IFT_HIPPI:         /* RFC1374 */
+               ah->ar_hrd = htons(ARPHRD_ETHER);
+               break;
+       case IFT_IEEE1394:      /* RFC2734 */
                ah->ar_hrd = htons(ARPHRD_IEEE1394);
                break;
        default:



Home | Main Index | Thread Index | Old Index