Lines 260-283
ip6_forward(struct mbuf *m, int srcrt)
Link Here
|
260 |
* modified by a redirect. |
260 |
* modified by a redirect. |
261 |
*/ |
261 |
*/ |
262 |
if (V_ip6_sendredirects && nh->nh_ifp == m->m_pkthdr.rcvif && !srcrt && |
262 |
if (V_ip6_sendredirects && nh->nh_ifp == m->m_pkthdr.rcvif && !srcrt && |
263 |
(nh->nh_flags & NHF_REDIRECT) == 0) { |
263 |
(nh->nh_flags & NHF_REDIRECT) == 0) |
264 |
if ((nh->nh_ifp->if_flags & IFF_POINTOPOINT) != 0) { |
|
|
265 |
/* |
266 |
* If the incoming interface is equal to the outgoing |
267 |
* one, and the link attached to the interface is |
268 |
* point-to-point, then it will be highly probable |
269 |
* that a routing loop occurs. Thus, we immediately |
270 |
* drop the packet and send an ICMPv6 error message. |
271 |
* |
272 |
* type/code is based on suggestion by Rich Draves. |
273 |
* not sure if it is the best pick. |
274 |
*/ |
275 |
icmp6_error(mcopy, ICMP6_DST_UNREACH, |
276 |
ICMP6_DST_UNREACH_ADDR, 0); |
277 |
goto bad; |
278 |
} |
279 |
type = ND_REDIRECT; |
264 |
type = ND_REDIRECT; |
280 |
} |
|
|
281 |
|
265 |
|
282 |
/* |
266 |
/* |
283 |
* Fake scoped addresses. Note that even link-local source or |
267 |
* Fake scoped addresses. Note that even link-local source or |
284 |
- |
|
|