Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/netinet6 pullup 1.42 -> 1.43 (approved by releng-1-5)



details:   https://anonhg.NetBSD.org/src/rev/20ab425e81e2
branches:  netbsd-1-5
changeset: 489484:20ab425e81e2
user:      itojun <itojun%NetBSD.org@localhost>
date:      Tue Sep 19 19:52:25 2000 +0000

description:
pullup 1.42 -> 1.43 (approved by releng-1-5)

 > kame sys/netinet6/icmp6.c 1.140 -> 1.144
 > >   in the check for the incoming redirect message, examine the gateway
 > >   (from the routing table) only when the address family of the gateway is
 > >   AF_INET6.

diffstat:

 sys/netinet6/icmp6.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 978d39686dbd -r 20ab425e81e2 sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c      Tue Sep 19 19:07:59 2000 +0000
+++ b/sys/netinet6/icmp6.c      Tue Sep 19 19:52:25 2000 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: icmp6.c,v 1.33.2.3 2000/08/16 01:22:25 itojun Exp $    */
-/*     $KAME: icmp6.c,v 1.131 2000/08/03 15:24:34 itojun Exp $ */
+/*     $NetBSD: icmp6.c,v 1.33.2.4 2000/09/19 19:52:25 itojun Exp $    */
+/*     $KAME: icmp6.c,v 1.144 2000/09/15 08:10:45 jinmei Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -1972,6 +1972,16 @@
        bcopy(&reddst6, &sin6.sin6_addr, sizeof(reddst6));
        rt = rtalloc1((struct sockaddr *)&sin6, 0);
        if (rt) {
+               if (rt->rt_gateway == NULL ||
+                   rt->rt_gateway->sa_family != AF_INET6) {
+                       log(LOG_ERR,
+                           "ICMP6 redirect rejected; no route "
+                           "with inet6 gateway found for redirect dst: %s\n",
+                           icmp6_redirect_diag(&src6, &reddst6, &redtgt6));
+                       RTFREE(rt);
+                       goto freeit;
+               }
+
                gw6 = &(((struct sockaddr_in6 *)rt->rt_gateway)->sin6_addr);
                if (bcmp(&src6, gw6, sizeof(struct in6_addr)) != 0) {
                        log(LOG_ERR,



Home | Main Index | Thread Index | Old Index