version 1.14, 2000/04/19 06:30:56 |
version 1.14.4.1, 2001/05/01 10:12:20 |
|
|
/* $NetBSD$ */ |
/* $NetBSD$ */ |
/* $KAME: in6_gif.c,v 1.34 2000/04/19 04:51:58 itojun Exp $ */ |
/* $KAME: in6_gif.c,v 1.43 2001/01/22 07:27:17 itojun Exp $ */ |
|
|
/* |
/* |
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. |
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. |
|
|
#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) |
#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) |
#include <sys/ioctl.h> |
#include <sys/ioctl.h> |
#endif |
#endif |
|
#include <sys/queue.h> |
|
#include <sys/syslog.h> |
|
|
#if defined(__FreeBSD__) && __FreeBSD__ >= 3 |
#if defined(__FreeBSD__) && __FreeBSD__ >= 3 |
#include <sys/malloc.h> |
#include <sys/malloc.h> |
Line 336 gif_encapcheck6(m, off, proto, arg) |
|
Line 338 gif_encapcheck6(m, off, proto, arg) |
|
/* martian filters on outer source - done in ip6_input */ |
/* martian filters on outer source - done in ip6_input */ |
|
|
/* ingress filters on outer source */ |
/* ingress filters on outer source */ |
if ((m->m_flags & M_PKTHDR) != 0 && m->m_pkthdr.rcvif) { |
if ((sc->gif_if.if_flags & IFF_LINK2) == 0 && |
|
(m->m_flags & M_PKTHDR) != 0 && m->m_pkthdr.rcvif) { |
struct sockaddr_in6 sin6; |
struct sockaddr_in6 sin6; |
struct rtentry *rt; |
struct rtentry *rt; |
|
|
Line 350 gif_encapcheck6(m, off, proto, arg) |
|
Line 353 gif_encapcheck6(m, off, proto, arg) |
|
#else |
#else |
rt = rtalloc1((struct sockaddr *)&sin6, 0); |
rt = rtalloc1((struct sockaddr *)&sin6, 0); |
#endif |
#endif |
if (!rt) |
if (!rt || rt->rt_ifp != m->m_pkthdr.rcvif) { |
return 0; |
#if 0 |
if (rt->rt_ifp != m->m_pkthdr.rcvif) { |
log(LOG_WARNING, "%s: packet from %s dropped " |
rtfree(rt); |
"due to ingress filter\n", if_name(&sc->gif_if), |
|
ip6_sprintf(&sin6.sin6_addr)); |
|
#endif |
|
if (rt) |
|
rtfree(rt); |
return 0; |
return 0; |
} |
} |
rtfree(rt); |
rtfree(rt); |