sync with draft-ietf-ipngwg-p2p-pingpong-00.txt. apply special behavior
only if ip6_dst is "neighbor" within p2p prefix. sync with kame
This commit is contained in:
parent
1071f796f4
commit
fc35f336c7
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ip6_forward.c,v 1.22 2001/06/22 12:33:05 itojun Exp $ */
|
||||
/* $NetBSD: ip6_forward.c,v 1.23 2001/07/18 09:24:26 itojun Exp $ */
|
||||
/* $KAME: ip6_forward.c,v 1.74 2001/06/12 23:54:55 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -424,14 +424,20 @@ ip6_forward(m, srcrt)
|
||||
*/
|
||||
if (rt->rt_ifp == m->m_pkthdr.rcvif && !srcrt &&
|
||||
(rt->rt_flags & (RTF_DYNAMIC|RTF_MODIFIED)) == 0) {
|
||||
if ((rt->rt_ifp->if_flags & IFF_POINTOPOINT) != 0) {
|
||||
if ((rt->rt_ifp->if_flags & IFF_POINTOPOINT) &&
|
||||
nd6_is_addr_neighbor((struct sockaddr_in6 *)&ip6_forward_rt.ro_dst, rt->rt_ifp)) {
|
||||
/*
|
||||
* If the incoming interface is equal to the outgoing
|
||||
* one, and the link attached to the interface is
|
||||
* point-to-point, then it will be highly probable
|
||||
* that a routing loop occurs. Thus, we immediately
|
||||
* drop the packet and send an ICMPv6 error message.
|
||||
*
|
||||
* one, the link attached to the interface is
|
||||
* point-to-point, and the IPv6 destination is
|
||||
* regarded as on-link on the link, then it will be
|
||||
* highly probable that the destination address does
|
||||
* not exist on the link and that the packet is going
|
||||
* to loop. Thus, we immediately drop the packet and
|
||||
* send an ICMPv6 error message.
|
||||
* For other routing loops, we dare to let the packet
|
||||
* go to the loop, so that a remote diagnosing host
|
||||
* can detect the loop by traceroute.
|
||||
* type/code is based on suggestion by Rich Draves.
|
||||
* not sure if it is the best pick.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user