Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/netinet Pull up revision 1.76 (requested by itojun):



details:   https://anonhg.NetBSD.org/src/rev/9bf482b87be8
branches:  netbsd-1-5
changeset: 491698:9bf482b87be8
user:      he <he%NetBSD.org@localhost>
date:      Wed May 09 19:37:41 2001 +0000

description:
Pull up revision 1.76 (requested by itojun):
  Correct faith prefix determintaion.

diffstat:

 sys/netinet/udp_usrreq.c |  27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)

diffs (54 lines):

diff -r a853f13fe8d6 -r 9bf482b87be8 sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c  Wed May 09 19:37:19 2001 +0000
+++ b/sys/netinet/udp_usrreq.c  Wed May 09 19:37:41 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: udp_usrreq.c,v 1.66.4.4 2001/04/06 00:26:54 he Exp $   */
+/*     $NetBSD: udp_usrreq.c,v 1.66.4.5 2001/05/09 19:37:41 he Exp $   */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -110,6 +110,11 @@
 #endif
 #endif
 
+#include "faith.h"
+#if defined(NFAITH) && NFAITH > 0
+#include <net/if_faith.h>
+#endif
+
 #include <machine/stdarg.h>
 
 #ifdef IPSEC
@@ -325,23 +330,21 @@
        struct udphdr *uh;
        u_int32_t plen, ulen;
 
+#ifndef PULLDOWN_TEST
+       IP6_EXTHDR_CHECK(m, off, sizeof(struct udphdr), IPPROTO_DONE);
+#endif
+       ip6 = mtod(m, struct ip6_hdr *);
+
 #if defined(NFAITH) && 0 < NFAITH
-       if (m->m_pkthdr.rcvif) {
-               if (m->m_pkthdr.rcvif->if_type == IFT_FAITH) {
-                       /* send icmp6 host unreach? */
-                       m_freem(m);
-                       return IPPROTO_DONE;
-               }
+       if (faithprefix(&ip6->ip6_dst)) {
+               /* send icmp6 host unreach? */
+               m_freem(m);
+               return IPPROTO_DONE;
        }
 #endif
 
        udp6stat.udp6s_ipackets++;
 
-#ifndef PULLDOWN_TEST
-       IP6_EXTHDR_CHECK(m, off, sizeof(struct udphdr), IPPROTO_DONE);
-#endif
-
-       ip6 = mtod(m, struct ip6_hdr *);
        /* check for jumbogram is done in ip6_input.  we can trust pkthdr.len */
        plen = m->m_pkthdr.len - off;
 #ifndef PULLDOWN_TEST



Home | Main Index | Thread Index | Old Index