Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/udp_usrreq.c,v retrieving revision 1.75 retrieving revision 1.76 diff -u -p -r1.75 -r1.76 --- src/sys/netinet/udp_usrreq.c 2001/01/24 09:04:16 1.75 +++ src/sys/netinet/udp_usrreq.c 2001/05/08 10:15:14 1.76 @@ -1,4 +1,4 @@ -/* $NetBSD: udp_usrreq.c,v 1.75 2001/01/24 09:04:16 itojun Exp $ */ +/* $NetBSD: udp_usrreq.c,v 1.76 2001/05/08 10:15:14 itojun 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 +#endif + #include #ifdef IPSEC @@ -332,23 +337,21 @@ udp6_input(mp, offp, proto) 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