ip6_forward.c (122062) | ip6_forward.c (122921) |
---|---|
1/* $FreeBSD: head/sys/netinet6/ip6_forward.c 122062 2003-11-04 16:02:05Z ume $ */ | 1/* $FreeBSD: head/sys/netinet6/ip6_forward.c 122921 2003-11-20 19:47:31Z andre $ */ |
2/* $KAME: ip6_forward.c,v 1.69 2001/05/17 03:48:30 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 328 unchanged lines hidden (view full) --- 338 if (ip6_forward_rt.ro_rt == 0 || 339 (ip6_forward_rt.ro_rt->rt_flags & RTF_UP) == 0) { 340 if (ip6_forward_rt.ro_rt) { 341 RTFREE(ip6_forward_rt.ro_rt); 342 ip6_forward_rt.ro_rt = 0; 343 } 344 345 /* this probably fails but give it a try again */ | 2/* $KAME: ip6_forward.c,v 1.69 2001/05/17 03:48:30 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 328 unchanged lines hidden (view full) --- 338 if (ip6_forward_rt.ro_rt == 0 || 339 (ip6_forward_rt.ro_rt->rt_flags & RTF_UP) == 0) { 340 if (ip6_forward_rt.ro_rt) { 341 RTFREE(ip6_forward_rt.ro_rt); 342 ip6_forward_rt.ro_rt = 0; 343 } 344 345 /* this probably fails but give it a try again */ |
346 rtalloc_ign((struct route *)&ip6_forward_rt, 347 RTF_PRCLONING); | 346 rtalloc((struct route *)&ip6_forward_rt); |
348 } 349 350 if (ip6_forward_rt.ro_rt == 0) { 351 ip6stat.ip6s_noroute++; 352 in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_noroute); 353 if (mcopy) { 354 icmp6_error(mcopy, ICMP6_DST_UNREACH, 355 ICMP6_DST_UNREACH_NOROUTE, 0); --- 7 unchanged lines hidden (view full) --- 363 RTFREE(ip6_forward_rt.ro_rt); 364 ip6_forward_rt.ro_rt = 0; 365 } 366 bzero(dst, sizeof(*dst)); 367 dst->sin6_len = sizeof(struct sockaddr_in6); 368 dst->sin6_family = AF_INET6; 369 dst->sin6_addr = ip6->ip6_dst; 370 | 347 } 348 349 if (ip6_forward_rt.ro_rt == 0) { 350 ip6stat.ip6s_noroute++; 351 in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_noroute); 352 if (mcopy) { 353 icmp6_error(mcopy, ICMP6_DST_UNREACH, 354 ICMP6_DST_UNREACH_NOROUTE, 0); --- 7 unchanged lines hidden (view full) --- 362 RTFREE(ip6_forward_rt.ro_rt); 363 ip6_forward_rt.ro_rt = 0; 364 } 365 bzero(dst, sizeof(*dst)); 366 dst->sin6_len = sizeof(struct sockaddr_in6); 367 dst->sin6_family = AF_INET6; 368 dst->sin6_addr = ip6->ip6_dst; 369 |
371 rtalloc_ign((struct route *)&ip6_forward_rt, RTF_PRCLONING); | 370 rtalloc((struct route *)&ip6_forward_rt); |
372 if (ip6_forward_rt.ro_rt == 0) { 373 ip6stat.ip6s_noroute++; 374 in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_noroute); 375 if (mcopy) { 376 icmp6_error(mcopy, ICMP6_DST_UNREACH, 377 ICMP6_DST_UNREACH_NOROUTE, 0); 378 } 379 m_freem(m); --- 248 unchanged lines hidden --- | 371 if (ip6_forward_rt.ro_rt == 0) { 372 ip6stat.ip6s_noroute++; 373 in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_noroute); 374 if (mcopy) { 375 icmp6_error(mcopy, ICMP6_DST_UNREACH, 376 ICMP6_DST_UNREACH_NOROUTE, 0); 377 } 378 m_freem(m); --- 248 unchanged lines hidden --- |