Deleted Added
sdiff udiff text old ( 79139 ) new ( 83934 )
full compact
1/* $FreeBSD: head/sys/netinet6/icmp6.c 83934 2001-09-25 18:40:52Z brooks $ */
2/* $KAME: icmp6.c,v 1.211 2001/04/04 05:56:20 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

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

98#include <netinet6/in6_ifattach.h>
99#include <netinet6/ip6protosw.h>
100
101#ifdef IPSEC
102#include <netinet6/ipsec.h>
103#include <netkey/key.h>
104#endif
105
106#include <net/net_osdep.h>
107
108#ifdef HAVE_NRL_INPCB
109/* inpcb members */
110#define in6pcb inpcb
111#define in6p_laddr inp_laddr6
112#define in6p_faddr inp_faddr6
113#define in6p_icmp6filt inp_icmp6filt

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

429 if ((sum = in6_cksum(m, IPPROTO_ICMPV6, off, icmp6len)) != 0) {
430 nd6log((LOG_ERR,
431 "ICMP6 checksum error(%d|%x) %s\n",
432 icmp6->icmp6_type, sum, ip6_sprintf(&ip6->ip6_src)));
433 icmp6stat.icp6s_checksum++;
434 goto freeit;
435 }
436
437 if (faithprefix_p != NULL && (*faithprefix_p)(&ip6->ip6_dst)) {
438 /*
439 * Deliver very specific ICMP6 type only.
440 * This is important to deilver TOOBIG. Otherwise PMTUD
441 * will not work.
442 */
443 switch (icmp6->icmp6_type) {
444 case ICMP6_DST_UNREACH:
445 case ICMP6_PACKET_TOO_BIG:
446 case ICMP6_TIME_EXCEEDED:
447 break;
448 default:
449 goto freeit;
450 }
451 }
452
453 icmp6stat.icp6s_inhist[icmp6->icmp6_type]++;
454 icmp6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_msg);
455 if (icmp6->icmp6_type < ICMP6_INFOMSG_MASK)
456 icmp6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_error);
457
458 switch (icmp6->icmp6_type) {
459 case ICMP6_DST_UNREACH:

--- 2408 unchanged lines hidden ---