Deleted Added
full compact
ip6_forward.c (171259) ip6_forward.c (171260)
1/* $FreeBSD: head/sys/netinet6/ip6_forward.c 171259 2007-07-05 16:23:49Z delphij $ */
1/* $FreeBSD: head/sys/netinet6/ip6_forward.c 171260 2007-07-05 16:29:40Z delphij $ */
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

--- 301 unchanged lines hidden (view full) ---

311 /* XXX: what icmp ? */
312#else
313 m_freem(mcopy);
314#endif
315 }
316 m_freem(m);
317 return;
318 } else {
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

--- 301 unchanged lines hidden (view full) ---

311 /* XXX: what icmp ? */
312#else
313 m_freem(mcopy);
314#endif
315 }
316 m_freem(m);
317 return;
318 } else {
319 /*
320 * In the FAST IPSec case we have already
319 /*
320 * In the FAST IPSec case we have already
321 * re-injected the packet and it has been freed
321 * re-injected the packet and it has been freed
322 * by the ipsec_done() function. So, just clean
322 * by the ipsec_done() function. So, just clean
323 * up after ourselves.
324 */
325 m = NULL;
326 goto freecopy;
327 }
328
329 if ((m != NULL) && (ip6 != mtod(m, struct ip6_hdr *)) ){
330 /*

--- 49 unchanged lines hidden (view full) ---

380 RTFREE(ip6_forward_rt.ro_rt);
381 ip6_forward_rt.ro_rt = 0;
382 }
383 bzero(dst, sizeof(*dst));
384 dst->sin6_len = sizeof(struct sockaddr_in6);
385 dst->sin6_family = AF_INET6;
386 dst->sin6_addr = ip6->ip6_dst;
387
323 * up after ourselves.
324 */
325 m = NULL;
326 goto freecopy;
327 }
328
329 if ((m != NULL) && (ip6 != mtod(m, struct ip6_hdr *)) ){
330 /*

--- 49 unchanged lines hidden (view full) ---

380 RTFREE(ip6_forward_rt.ro_rt);
381 ip6_forward_rt.ro_rt = 0;
382 }
383 bzero(dst, sizeof(*dst));
384 dst->sin6_len = sizeof(struct sockaddr_in6);
385 dst->sin6_family = AF_INET6;
386 dst->sin6_addr = ip6->ip6_dst;
387
388 rtalloc((struct route *)&ip6_forward_rt);
388 rtalloc((struct route *)&ip6_forward_rt);
389 if (ip6_forward_rt.ro_rt == 0) {
390 ip6stat.ip6s_noroute++;
391 in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_noroute);
392 if (mcopy) {
393 icmp6_error(mcopy, ICMP6_DST_UNREACH,
394 ICMP6_DST_UNREACH_NOROUTE, 0);
395 }
396 m_freem(m);

--- 258 unchanged lines hidden ---
389 if (ip6_forward_rt.ro_rt == 0) {
390 ip6stat.ip6s_noroute++;
391 in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_noroute);
392 if (mcopy) {
393 icmp6_error(mcopy, ICMP6_DST_UNREACH,
394 ICMP6_DST_UNREACH_NOROUTE, 0);
395 }
396 m_freem(m);

--- 258 unchanged lines hidden ---