Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/net Pull up revision 1.15 (requested by itojun in t...



details:   https://anonhg.NetBSD.org/src/rev/475e86c98a5c
branches:  netbsd-1-6
changeset: 527919:475e86c98a5c
user:      lukem <lukem%NetBSD.org@localhost>
date:      Sat Jun 15 01:06:54 2002 +0000

description:
Pull up revision 1.15 (requested by itojun in ticket #261):
correect AF_INET6 handling

diffstat:

 sys/net/if_hippisubr.c |  22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diffs (51 lines):

diff -r 5a7bb58e2949 -r 475e86c98a5c sys/net/if_hippisubr.c
--- a/sys/net/if_hippisubr.c    Sat Jun 15 01:05:49 2002 +0000
+++ b/sys/net/if_hippisubr.c    Sat Jun 15 01:06:54 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_hippisubr.c,v 1.14 2001/11/12 23:49:39 lukem Exp $  */
+/*     $NetBSD: if_hippisubr.c,v 1.14.10.1 2002/06/15 01:06:54 lukem Exp $     */
 
 /*
  * Copyright (c) 1982, 1989, 1993
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_hippisubr.c,v 1.14 2001/11/12 23:49:39 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hippisubr.c,v 1.14.10.1 2002/06/15 01:06:54 lukem Exp $");
 
 #include "opt_inet.h"
 
@@ -155,11 +155,7 @@
        IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr);
 
        switch (dst->sa_family) {
-
 #ifdef INET
-#ifdef INET6
-       case AF_INET6:
-#endif
        case AF_INET:
                if (rt) {
                        struct sockaddr_dl *sdl = 
@@ -173,6 +169,20 @@
                break;
 #endif
 
+#ifdef INET6
+       case AF_INET6:
+               if (rt) {
+                       struct sockaddr_dl *sdl = 
+                               (struct sockaddr_dl *) SDL(rt->rt_gateway);
+                       if (sdl->sdl_family == AF_LINK && sdl->sdl_alen != 0)
+                               bcopy(LLADDR(sdl), &ifield, sizeof(ifield));
+               }
+               if (!ifield)  /* XXX:  bogus check, but helps us get going */
+                       senderr(EHOSTUNREACH);
+               htype = htons(ETHERTYPE_IPV6);
+               break;
+#endif
+
        default:
                printf("%s: can't handle af%d\n", ifp->if_xname,
                       dst->sa_family);



Home | Main Index | Thread Index | Old Index