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.66.4.4 retrieving revision 1.66.4.5 diff -u -p -r1.66.4.4 -r1.66.4.5 --- src/sys/netinet/udp_usrreq.c 2001/04/06 00:26:54 1.66.4.4 +++ src/sys/netinet/udp_usrreq.c 2001/05/09 19:37:41 1.66.4.5 @@ -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 +#endif + #include #ifdef IPSEC @@ -325,23 +330,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