linux/net/ipv4/icmp.c
<<
>>
Prefs
   1/*
   2 *      NET3:   Implementation of the ICMP protocol layer.
   3 *
   4 *              Alan Cox, <alan@lxorguk.ukuu.org.uk>
   5 *
   6 *      This program is free software; you can redistribute it and/or
   7 *      modify it under the terms of the GNU General Public License
   8 *      as published by the Free Software Foundation; either version
   9 *      2 of the License, or (at your option) any later version.
  10 *
  11 *      Some of the function names and the icmp unreach table for this
  12 *      module were derived from [icmp.c 1.0.11 06/02/93] by
  13 *      Ross Biro, Fred N. van Kempen, Mark Evans, Alan Cox, Gerhard Koerting.
  14 *      Other than that this module is a complete rewrite.
  15 *
  16 *      Fixes:
  17 *      Clemens Fruhwirth       :       introduce global icmp rate limiting
  18 *                                      with icmp type masking ability instead
  19 *                                      of broken per type icmp timeouts.
  20 *              Mike Shaver     :       RFC1122 checks.
  21 *              Alan Cox        :       Multicast ping reply as self.
  22 *              Alan Cox        :       Fix atomicity lockup in ip_build_xmit
  23 *                                      call.
  24 *              Alan Cox        :       Added 216,128 byte paths to the MTU
  25 *                                      code.
  26 *              Martin Mares    :       RFC1812 checks.
  27 *              Martin Mares    :       Can be configured to follow redirects
  28 *                                      if acting as a router _without_ a
  29 *                                      routing protocol (RFC 1812).
  30 *              Martin Mares    :       Echo requests may be configured to
  31 *                                      be ignored (RFC 1812).
  32 *              Martin Mares    :       Limitation of ICMP error message
  33 *                                      transmit rate (RFC 1812).
  34 *              Martin Mares    :       TOS and Precedence set correctly
  35 *                                      (RFC 1812).
  36 *              Martin Mares    :       Now copying as much data from the
  37 *                                      original packet as we can without
  38 *                                      exceeding 576 bytes (RFC 1812).
  39 *      Willy Konynenberg       :       Transparent proxying support.
  40 *              Keith Owens     :       RFC1191 correction for 4.2BSD based
  41 *                                      path MTU bug.
  42 *              Thomas Quinot   :       ICMP Dest Unreach codes up to 15 are
  43 *                                      valid (RFC 1812).
  44 *              Andi Kleen      :       Check all packet lengths properly
  45 *                                      and moved all kfree_skb() up to
  46 *                                      icmp_rcv.
  47 *              Andi Kleen      :       Move the rate limit bookkeeping
  48 *                                      into the dest entry and use a token
  49 *                                      bucket filter (thanks to ANK). Make
  50 *                                      the rates sysctl configurable.
  51 *              Yu Tianli       :       Fixed two ugly bugs in icmp_send
  52 *                                      - IP option length was accounted wrongly
  53 *                                      - ICMP header length was not accounted
  54 *                                        at all.
  55 *              Tristan Greaves :       Added sysctl option to ignore bogus
  56 *                                      broadcast responses from broken routers.
  57 *
  58 * To Fix:
  59 *
  60 *      - Should use skb_pull() instead of all the manual checking.
  61 *        This would also greatly simply some upper layer error handlers. --AK
  62 *
  63 */
  64
  65#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  66
  67#include <linux/module.h>
  68#include <linux/types.h>
  69#include <linux/jiffies.h>
  70#include <linux/kernel.h>
  71#include <linux/fcntl.h>
  72#include <linux/socket.h>
  73#include <linux/in.h>
  74#include <linux/inet.h>
  75#include <linux/inetdevice.h>
  76#include <linux/netdevice.h>
  77#include <linux/string.h>
  78#include <linux/netfilter_ipv4.h>
  79#include <linux/slab.h>
  80#include <net/snmp.h>
  81#include <net/ip.h>
  82#include <net/route.h>
  83#include <net/protocol.h>
  84#include <net/icmp.h>
  85#include <net/tcp.h>
  86#include <net/udp.h>
  87#include <net/raw.h>
  88#include <net/ping.h>
  89#include <linux/skbuff.h>
  90#include <net/sock.h>
  91#include <linux/errno.h>
  92#include <linux/timer.h>
  93#include <linux/init.h>
  94#include <asm/uaccess.h>
  95#include <net/checksum.h>
  96#include <net/xfrm.h>
  97#include <net/inet_common.h>
  98#include <net/ip_fib.h>
  99
 100/*
 101 *      Build xmit assembly blocks
 102 */
 103
 104struct icmp_bxm {
 105        struct sk_buff *skb;
 106        int offset;
 107        int data_len;
 108
 109        struct {
 110                struct icmphdr icmph;
 111                __be32         times[3];
 112        } data;
 113        int head_len;
 114        struct ip_options_data replyopts;
 115};
 116
 117/* An array of errno for error messages from dest unreach. */
 118/* RFC 1122: 3.2.2.1 States that NET_UNREACH, HOST_UNREACH and SR_FAILED MUST be considered 'transient errs'. */
 119
 120const struct icmp_err icmp_err_convert[] = {
 121        {
 122                .errno = ENETUNREACH,   /* ICMP_NET_UNREACH */
 123                .fatal = 0,
 124        },
 125        {
 126                .errno = EHOSTUNREACH,  /* ICMP_HOST_UNREACH */
 127                .fatal = 0,
 128        },
 129        {
 130                .errno = ENOPROTOOPT    /* ICMP_PROT_UNREACH */,
 131                .fatal = 1,
 132        },
 133        {
 134                .errno = ECONNREFUSED,  /* ICMP_PORT_UNREACH */
 135                .fatal = 1,
 136        },
 137        {
 138                .errno = EMSGSIZE,      /* ICMP_FRAG_NEEDED */
 139                .fatal = 0,
 140        },
 141        {
 142                .errno = EOPNOTSUPP,    /* ICMP_SR_FAILED */
 143                .fatal = 0,
 144        },
 145        {
 146                .errno = ENETUNREACH,   /* ICMP_NET_UNKNOWN */
 147                .fatal = 1,
 148        },
 149        {
 150                .errno = EHOSTDOWN,     /* ICMP_HOST_UNKNOWN */
 151                .fatal = 1,
 152        },
 153        {
 154                .errno = ENONET,        /* ICMP_HOST_ISOLATED */
 155                .fatal = 1,
 156        },
 157        {
 158                .errno = ENETUNREACH,   /* ICMP_NET_ANO */
 159                .fatal = 1,
 160        },
 161        {
 162                .errno = EHOSTUNREACH,  /* ICMP_HOST_ANO */
 163                .fatal = 1,
 164        },
 165        {
 166                .errno = ENETUNREACH,   /* ICMP_NET_UNR_TOS */
 167                .fatal = 0,
 168        },
 169        {
 170                .errno = EHOSTUNREACH,  /* ICMP_HOST_UNR_TOS */
 171                .fatal = 0,
 172        },
 173        {
 174                .errno = EHOSTUNREACH,  /* ICMP_PKT_FILTERED */
 175                .fatal = 1,
 176        },
 177        {
 178                .errno = EHOSTUNREACH,  /* ICMP_PREC_VIOLATION */
 179                .fatal = 1,
 180        },
 181        {
 182                .errno = EHOSTUNREACH,  /* ICMP_PREC_CUTOFF */
 183                .fatal = 1,
 184        },
 185};
 186EXPORT_SYMBOL(icmp_err_convert);
 187
 188/*
 189 *      ICMP control array. This specifies what to do with each ICMP.
 190 */
 191
 192struct icmp_control {
 193        void (*handler)(struct sk_buff *skb);
 194        short   error;          /* This ICMP is classed as an error message */
 195};
 196
 197static const struct icmp_control icmp_pointers[NR_ICMP_TYPES+1];
 198
 199/*
 200 *      The ICMP socket(s). This is the most convenient way to flow control
 201 *      our ICMP output as well as maintain a clean interface throughout
 202 *      all layers. All Socketless IP sends will soon be gone.
 203 *
 204 *      On SMP we have one ICMP socket per-cpu.
 205 */
 206static struct sock *icmp_sk(struct net *net)
 207{
 208        return net->ipv4.icmp_sk[smp_processor_id()];
 209}
 210
 211static inline struct sock *icmp_xmit_lock(struct net *net)
 212{
 213        struct sock *sk;
 214
 215        local_bh_disable();
 216
 217        sk = icmp_sk(net);
 218
 219        if (unlikely(!spin_trylock(&sk->sk_lock.slock))) {
 220                /* This can happen if the output path signals a
 221                 * dst_link_failure() for an outgoing ICMP packet.
 222                 */
 223                local_bh_enable();
 224                return NULL;
 225        }
 226        return sk;
 227}
 228
 229static inline void icmp_xmit_unlock(struct sock *sk)
 230{
 231        spin_unlock_bh(&sk->sk_lock.slock);
 232}
 233
 234/*
 235 *      Send an ICMP frame.
 236 */
 237
 238static inline bool icmpv4_xrlim_allow(struct net *net, struct rtable *rt,
 239                                      struct flowi4 *fl4, int type, int code)
 240{
 241        struct dst_entry *dst = &rt->dst;
 242        bool rc = true;
 243
 244        if (type > NR_ICMP_TYPES)
 245                goto out;
 246
 247        /* Don't limit PMTU discovery. */
 248        if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED)
 249                goto out;
 250
 251        /* No rate limit on loopback */
 252        if (dst->dev && (dst->dev->flags&IFF_LOOPBACK))
 253                goto out;
 254
 255        /* Limit if icmp type is enabled in ratemask. */
 256        if ((1 << type) & net->ipv4.sysctl_icmp_ratemask) {
 257                struct inet_peer *peer = inet_getpeer_v4(net->ipv4.peers, fl4->daddr, 1);
 258                rc = inet_peer_xrlim_allow(peer,
 259                                           net->ipv4.sysctl_icmp_ratelimit);
 260                if (peer)
 261                        inet_putpeer(peer);
 262        }
 263out:
 264        return rc"sref">peer);
 266
 267/*
 268 *      Maintain the counters used in the SNMP statistics for outgoing ICMP
 269 */
 270void icmp_out_count(struct net *net, unsigned char type)
 271{
 272        ICMPMSGOUT_INC_STATS(net, type)"sref">peer);
 273        ICMP_INC_STATS(net, ICMP_MIB_OUTMSGS)"sref">peer);
 274}
 275
 276/*
 277 *      Checksum each fragment, and on the first include the headers and final
 278 *      checksum.
 279 */
 280static int icmp_glue_bits(void *from, char *to, int offset, int len, int odd,
 281                          struct sk_buff *skb)
 282{
 283        struct icmp_bxm *icmp_param = (struct icmp_bxm *)from"sref">peer);
 284        __wsum csum"sref">peer);
 285
 286        csum = skb_copy_and_csum_bits(icmp_param->skb,
 287                                      icmp_param->offset + offset,
 288                                      to, len, 0)"sref">peer);
 289
 290        skb->csum = csum_block_add(skb->csum, csum, odd)"sref">peer);
 291        if (icmp_pointers[icmp_param->data.icmph.type].error)
 292                nf_ct_attach(skb, icmp_param->skb)"sref">peer);
 293        return 0"sref">peer);
 294}
 295
 296static void icmp_push_reply(struct icmp_bxm *icmp_param,
 297                            struct flowi4 *fl4,
 298                            struct ipcm_cookie *ipc, struct rtable **rt)
 299{
 300        struct sock *sk;
 301        struct sk_buff *skb;
 302
 303        sk = icmp_sk(dev_net((*rt)->dst.dev))"sref">peer);
 304        if (ip_append_data(sk, fl4, icmp_glue_bits, icmp_param,
 305                           icmp_param->data_len+icmp_param->head_len,
 306                           icmp_param->head_len,
 307                           ipc, rt, MSG_DONTWAIT) < 0) {
 308                ICMP_INC_STATS_BH(sock_net(sk), ICMP_MIB_OUTERRORS)"sref">peer);
 309                ip_flush_pending_frames(sk)"sref">peer);
 310        } else if ((skb = skb_peek(&sk->sk_write_queue)) != NULL) {
 311                struct icmphdr *icmph = icmp_hdr(skb)"sref">peer);
 312                __wsum csum = 0"sref">peer);
 313                struct sk_buff *skb1;
 314
 315                skb_queue_walk(&sk->sk_write_queue, skb1) {
 316                        csum = csum_add(csum, skb1->csum)"sref">peer);
 317                }
 318                csum = csum_partial_copy_nocheck((void *)&icmp_param->data,
 319                                                 (char *)icmph,
 320                                                 icmp_param->head_len, csum)"sref">peer);
 321                icmph->checksum = csum_fold(csum)"sref">peer);
 322                skb->ip_summed = CHECKSUM_NONE;
 323                ip_push_pending_frames(sk, fl4)"sref">peer);
 324        }
 325}
 326
 327/*
 328 *      Driving logic for building and sending ICMP messages.
 329 */
 330
 331static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb)
 332{
 333        struct ipcm_cookie ipc"sref">peer);
 334        struct rtable *rt = skb_rtable(skb)"sref">peer);
 335        struct net *net = dev_net(rt->dst.dev)"sref">peer);
 336        struct flowi4 fl4"sref">peer);
 337        struct sock *sk;
 338        struct inet_sock *inet;
 339        __be32 daddr, saddr;
 340
 341        if (ip_options_echo(&icmp_param->replyopts.opt.opt, skb))
 342                return;
 343
 344        sk = icmp_xmit_lock(net)"sref">peer);
 345        if (sk == NULL)sref">peer);
 346                return;
 347        inet = inet_sk(sk)"sref">peer);
 348
 349        icmp_param->data.icmph.checksum = 0"sref">peer);
 350
 351        inet->tos = ip_hdr(skb)->tos"sref">peer);
 352        daddr = ipc.addr = ip_hdr(skb)->saddr;
 353        saddr = fib_compute_spec_dst(skb)"sref">peer);
 354        ipc.opt = NULL;
 355        ipc.tx_flags = 0"sref">peer);
 356        if (icmp_param->replyopts.opt.opt.optlen) {
 357                ipc.opt = &icmp_param->replyopts.opt"sref">peer);
 358                if (ipc.opt->opt.srr)
 359                        daddr = icmp_param->replyopts.opt.opt.faddr;
 360        }
 361        memset(&fl4, 0, sizeof(fl4))"sref">peer);
 362        fl4.daddr = daddr"sref">peer);
 363        fl4.saddr = saddr;
 364        fl4.flowi4_tos = RT_TOS(ip_hdr(skb)->tos)"sref">peer);
fl4.flowi4_proto = IPPROTO_ICMP;
 366        security_skb_classify_flow(skb, flowi4_to_flowi(&fl4))"sref">peer);
 367        rt = ip_route_output_key(net, &fl4)"sref">peer);
 368        if (IS_ERR(rt))
 369                goto out_unlock;
 370        if (icmpv4_xrlim_allow(net, rt, &fl4, icmp_param->data.icmph.type,
 371                               icmp_param->data.icmph.code))
 372                icmp_push_reply(icmp_param, &fl4, &ipc, &rt)"sref">peer);
 373        ip_rt_put(rt)"sref">peer);
 374out_unlock:
 375        icmp_xmit_unlock(sk)"sref">peer);
 376}
 377
 378static struct rtable *icmp_route_lookup(struct net *net,
 379                                        struct flowi4 *fl4,
 380                                        struct sk_buff *skb_in,
 381                                        const struct iphdr *iph,
 382                                        __be32 saddr, u8 tos,
 383                                        int type, int code,
 384                                        struct icmp_bxm *param)
 385{
 386        struct rtable *rt, *rt2;
 387        struct flowi4 fl4_dec;
 388        int err;
 389
 390        memset(fl4, 0, sizeof(*fl4))"sref">peer);
 391        fl4->daddr = (param->replyopts.opt.opt.srr ?sref">peer);
 392                      param->replyopts.opt.opt.faddr : iph->saddr)"sref">peer);
 393        fl4->saddr = saddr;
 394        fl4->flowi4_tos = RT_TOS(tos)"sref">peer);
 395        fl4->flowi4_proto = IPPROTO_ICMP;
 396        fl4->fl4_icmp_type = type;
 397        fl4->fl4_icmp_code = code;
 398        security_skb_classify_flow(skb_in, flowi4_to_flowi(fl4))"sref">peer);
 399        rt = __ip_route_output_key(net, fl4)"sref">peer);
 400        if (IS_ERR(rt))
 401                return rt"sref">peer);
 402
 403        /* No need to clone since we're just using its address. */
 404        rt2 = rt"sref">peer);
 405
 406        rt = (struct rtable *) xfrm_lookup(net, &rt->dst,
 407                                           flowi4_to_flowi(fl4), NULL, 0)"sref">peer);
 408        if (!IS_ERR(rt)) {
 409                if (rt != rt2)
 410                        return rt"sref">peer);
 411        } else if (PTR_ERR(rt) == -EPERM) {
 412                rt = NULL;
 413        } else
 414                return rt"sref">peer);
 415
 416        err = xfrm_decode_session_reverse(skb_in, flowi4_to_flowi(&fl4_dec), AF_INET)"sref">peer);
 417        if (err)
 418                goto relookup_failed"sref">peer);
 419
 420        if (inet_addr_type(net, fl4_dec.saddr) == RTN_LOCAL) {
 421                rt2 = __ip_route_output_key(net, &fl4_dec)"sref">peer);
 422                if (IS_ERR(rt2))
 423                        err = PTR_ERR(rt2)"sref">peer);
 424        } else {
 425                struct flowi4 fl4_2 = {}"sref">peer);
 426                unsigned long orefdst"sref">peer);
 427
 428                fl4_2.daddr = fl4_dec.saddr"sref">peer);
 429                rt2 = ip_route_output_key(net, &fl4_2)"sref">peer);
 430                if (IS_ERR(rt2)) {
 431                        err = PTR_ERR(rt2)"sref">peer);
 432                        goto relookup_failed"sref">peer);
 433                }
 434                /* Ugh! */
 435                orefdst = skb_in->_skb_refdst" /* save old refdst */
 436                err = ip_route_input(skb_in, fl4_dec.daddr, fl4_dec.saddr,
 437                                     RT_TOS(tos), rt2->dst.dev)"sref">peer);
 438
 439                dst_release(&rt2->dst)"sref">peer);
 440                rt2 = skb_rtable(skb_in)"sref">peer);
 441                skb_in->_skb_refdst = orefdst" /* restore old refdst */
 442        }
 443
 444        if (err)
 445                goto relookup_failed"sref">peer);
 446
 447        rt2 = (struct rtable *) xfrm_lookup(net, &rt2->dst,
 448                                            flowi4_to_flowi(&fl4_dec), NULL,
 449                                            XFRM_LOOKUP_ICMP)"sref">peer);
 450        if (!IS_ERR(rt2)) {
 451                dst_release(&rt->dst)"sref">peer);
 452                memcpy(fl4, &fl4_dec, sizeof(*fl4))"sref">peer);
 453                rt = rt2;
 454        } else if (PTR_ERR(rt2) == -EPERM) {
 455                if (rt)
 456                        dst_release(&rt->dst)"sref">peer);
 457                return rt2;
 458        } else {
 459                err = PTR_ERR(rt2)"sref">peer);
 460                goto relookup_failed"sref">peer);
 461        }
 462        return rt"sref">peer);
 463
 464relookup_failed:
rt)
 466                return rt"sref">peer);
 467        return ERR_PTR(err)"sref">peer);
 468}
 469
 470/*
 471 *      Send an ICMP message in response to a situation
 472 *
 473 *      RFC 1122: 3.2.2 MUST send at least the IP header and 8 bytes of header.
 474 *                MAY send more (we do).
 475 *                      MUST NOT change this header information.
 476 *                      MUST NOT reply to a multicast/broadcast IP address.
 477 *                      MUST NOT reply to a multicast/broadcast MAC address.
 478 *                      MUST reply to only the first fragment.
 479 */
 480
 481void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
 482{
 483        struct iphdr *iph"sref">peer);
 484        int room"sref">peer);
 485        struct icmp_bxm icmp_param"sref">peer);
 486        struct rtable *rt = skb_rtable(skb_in)"sref">peer);
 487        struct ipcm_cookie ipc"sref">peer);
 488        struct flowi4 fl4"sref">peer);
 489        __be32 saddr"sref">peer);
 490        u8  tos"sref">peer);
 491        struct net *net"sref">peer);
 492        struct sock *sk;
 493
 494        if (!rt)
 495                goto out"sref">peer);
 496        net = dev_net(rt->dst.dev)"sref">peer);
 497
 498        /*
 499         *      Find the original header. It is expected to be valid, of course.
 500         *      Check this, icmp_send is called from the most obscure devices
 501         *      sometimes.
 502         */
 503        iph = ip_hdr(skb_in)"sref">peer);
 504sref">peer);
 505        if ((u8 *)iph < skb_in->head ||sref">peer);
 506            (skb_in->network_header + sizeof(*iph)) > skb_in->tail)
 507                goto out"sref">peer);
 508
 509        /*
 510         *      No replies to physical multicast/broadcast
 511         */
 512        if (skb_in->pkt_type != PACKET_HOST)
 513                goto out"sref">peer);
 514sref">peer);
 515        /*
 516         *      Now check at the protocol level
 517         */
 518        if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))
 519                goto out"sref">peer);
 520
 521        /*
 522         *      Only reply to fragment 0. We byte re-order the constant
 523         *      mask for efficiency.
 524         */
 525        if (iph->frag_off & htons(IP_OFFSET))
 526                goto out"sref">peer);
 527
 528        /*
 529         *      If we send an ICMP error to an ICMP error a mess would result..
 530         */
 531        if (icmp_pointers[type].error) {
 532                /*
 533                 *      We are an error, check if we are replying to an
 534                 *      ICMP error
 535                 */
 536                if (iph->protocol == IPPROTO_ICMP) {
 537                        u8 _inner_type, *itp"sref">peer);
 538
 539                        itp = skb_header_pointer(skb_in,
 540                                                 skb_(skb_in) +
 541                                                 (iph->ihl << 2) +
 542                                                 offsetof(struct icmphdr,
 543                                                          type) -
 544                                                 skb_in->data,
 545                                                 sizeof(_inner_type),
 546                                                 &_inner_type)"sref">peer);
 547                        if (itp == NULL)
 548                                goto out"sref">peer);
 549
 550                        /*
 551                         *      Assume any unknown ICMP type is an error. This
 552                         *      isn't specified by the RFC, but think about it..
 553                         */
 554                        if (*itp > NR_ICMP_TYPES ||sref">peer);
 555                            icmp_pointers[*itp].error)sref">peer);
 556                                goto out"sref">peer);
 557                }
 558        }
 559
 560        sk = icmp_xmit_lock(net)"sref">peer);
 561        if (sk == NULL)
 562                return"sref">peer);
 563
 564        /*
         *      Construct source address and options.
 566         */
 567
 568        saddr = iph->daddr"sref">peer);
 569        if (!(rt->rt_flags & RTCF_LOCAL)) {
 570                struct net_device *dev = NULL;
 571
 572                rcu_read_lock()"sref">peer);
 573                if (rt_is_input_route(rt) &&sref">peer);
 574                    net->ipv4.sysctl_icmp_errors_use_inbound_ifaddr)
 575                        dev = dev_get_by_index_rcu(net, inet_iif(skb_in))"sref">peer);
 576
 577                if (dev)
 578                        saddr = inet_select_addr(dev, 0, RT_SCOPE_LINK)"sref">peer);
 579                else
 580                        saddr = 0"sref">peer);
 581                rcu_read_unlock()"sref">peer);
 582        }
 583
 584        tos = icmp_pointers[type].error ? ((iph->tos & IPTOS_TOS_MASK) |sref">peer);
 585                                           IPTOS_PREC_INTERNETCONTROL) :
 586                                          iph->tos"sref">peer);
 587
 588        if (ip_options_echo(&icmp_param.replyopts.opt.opt, skb_in))
 589                goto out_unlock"sref">peer);
 590
 591
 592        /*
 593         *      Prepare data for ICMP header.
 594         */
 595
 596        icmp_param.data.icmph.type       = type"sref">peer);
 597        icmp_param.data.icmph.code       = code"sref">peer);
 598        icmp_param.data.icmph.un.gateway = info"sref">peer);
 599        icmp_param.data.icmph.checksum   = 0"sref">peer);
 600        icmp_param.skb    = skb_in"sref">peer);
 601        icmp_param.offset = skb_(skb_in)"sref">peer);
 602        inet_sk(sk)->tos = tos"sref">peer);
 603        ipc.addr = iph->saddr"sref">peer);
 604        ipc.opt = &icmp_param.replyopts.opt"sref">peer);
 605        ipc.tx_flags = 0"sref">peer);
 606
 607        rt = icmp_route_lookup(net, &fl4, skb_in, iph, saddr, tos,
 608                               type, code, &icmp_param)"sref">peer);
 609        if (IS_ERR(rt))
 610                goto out_unlock"sref">peer);
 611
 612        if (!icmpv4_xrlim_allow(net, rt, &fl4, type, code))
 613                goto ende"sref">peer);
 614sref">peer);
 615        /* RFC says return as much as we can without exceeding 576 bytes. */
 616
 617        room = dst_mtu(&rt->dst)"sref">peer);
 618        if (room > 576)
 619                room = 576"sref">peer);
 620        room -= sizeof(struct iphdr) + icmp_param.replyopts.opt.opt.optlen"sref">peer);
 621        room -= sizeof(struct icmphdr)"sref">peer);
 622sref">peer);
 623        icmp_param.data_len = skb_in->len - icmp_param.offset"sref">peer);
 624        if (icmp_param.data_len > room)
 625                icmp_param.data_len = room"sref">peer);
 626        icmp_param.head_len = sizeof(struct icmphdr)"sref">peer);
 627
 628        icmp_push_reply(&icmp_param, &fl4, &ipc, &rt)"sref">peer);
 629ende:
 630        ip_rt_put(rt)"sref">peer);
 631out_unlock:
 632        icmp_xmit_unlock(sk)"sref">peer);
 633out:"sref">peer);
 634}
 635EXPORT_SYMBOL(icmp_send)"sref">peer);
 636
 637
 638static void icmp_socket_deliver(struct sk_buff *skb, u32 info)
 639{
 640        const struct iphdr *iph = (const struct iphdr *) skb->data"sref">peer);
 641        const struct net_protocol *ipprot"sref">peer);
 642        int protocol = iph->protocol"sref">peer);
 643
 644        /* Checkin full IP header plus 8 bytes of protocol to
 645         * avoid additional coding at protocol handlers.
 646         */
 647        if (!pskb_may_pull(skb, iph->ihl * 4 + 8))
 648                return"sref">peer);
 649
 650        raw_icmp_error(skb, protocol, info)"sref">peer);
 651
 652        rcu_read_lock()"sref">peer);
 653        ipprot = rcu_dereference(inet_protos[protocol])"sref">peer);
 654        if (ipprot && ipprot->err_handler)
 655                ipprot->err_handler(skb, info)"sref">peer);
 656        rcu_read_unlock()"sref">peer);
 657}
 658
 659/*
 660 *      Handle ICMP_DEST_UNREACH, ICMP_TIME_EXCEED, and ICMP_QUENCH.
 661 */
 662sref">peer);
 663static void icmp_unreach(struct sk_buff *skb)
 664{
iphdr *iph"sref">peer);
 666        struct icmphdr *icmph"sref">peer);
 667        struct net *net"sref">peer);
 668        u32 info = 0"sref">peer);
 669
 670        net = dev_net(skb_dst(skb)->dev)"sref">peer);
 671
 672        /*
 673         *      Incomplete header ?
 674         *      Only checks for the IP header, there should be an
 675         *      additional check for longer headers in upper levels.
 676         */
 677
 678        if (!pskb_may_pull(skb, sizeof(struct iphdr)))
 679                goto out_err"sref">peer);
 680
 681        icmph = icmp_hdr(skb)"sref">peer);
 682        iph   = (const struct iphdr *)skb->data"sref">peer);
 683
 684        if (iph->ihl < 5) /* Mangled header, drop. */
 685                goto out_err"sref">peer);
 686
 687        if (icmph->type == ICMP_DEST_UNREACH) {
 688                switch (icmph->code & 15) {
 689                case ICMP_NET_UNREACH:
 690                case ICMP_HOST_UNREACH:
 691                case ICMP_PROT_UNREACH:
 692                case ICMP_PORT_UNREACH:
 693                        break"sref">peer);
 694                case ICMP_FRAG_NEEDED:
 695                        if (ipv4_config.no_pmtu_disc) {
 696                                LIMIT_NETDEBUG(KERN_INFO pr_fmt("%pI4: fragmentation needed and DF set\n"),
 697                                               &iph->daddr)"sref">peer);
 698                        } else {
 699                                info = ntohs(icmph->un.frag.mtu)"sref">peer);
 700                                if (!info)
 701                                        goto out"sref">peer);
 702                        }sref">peer);
 703                        break"sref">peer);
 704                case ICMP_SR_FAILED:
 705                        LIMIT_NETDEBUG(KERN_INFO pr_fmt("%pI4: Source Route Failed\n"),
 706                                       &iph->daddr)"sref">peer);
 707                        break"sref">peer);
 708                default:
 709                        break"sref">peer);
 710                }sref">peer);
 711                if (icmph->code > NR_ICMP_UNREACH)
 712                        goto out"sref">peer);
 713        } else if (icmph->type == ICMP_PARAMETERPROB)
 714                info = ntohl(icmph->un.gateway) >> 24"sref">peer);
 715
 716        /*
 717         *      Throw it at our lower layers
 718         *
 719         *      RFC 1122: 3.2.2 MUST extract the protocol ID from the passed
 720         *                header.
 721         *      RFC 1122: 3.2.2.1 MUST pass ICMP unreach messages to the
 722         *                transport layer.
 723         *      RFC 1122: 3.2.2.2 MUST pass ICMP time expired messages to
 724         *                transport layer.
 725         */
 726
 727        /*
 728         *      Check the other end isn't violating RFC 1122. Some routers send
 729         *      bogus responses to broadcast frames. If you see this message
 730         *      first check your netmask matches at both ends, if it does then
 731         *      get the other vendor to fix their kit.
 732         */
 733
 734        if (!net->ipv4.sysctl_icmp_ignore_bogus_error_responses &&sref">peer);
 735            inet_addr_type(net, iph->daddr) == RTN_BROADCAST) {
 736                net_warn_ratelimited("%pI4 sent an invalid ICMP type %u, code %u error to a broadcast: %pI4 on %s\n",
 737                                     &ip_hdr(skb)->saddr,
 738                                     icmph->type, icmph->codede" class="sref">codede" c9et_warn_8 r71t 699                                     /a>, iph->fl4 *)skbskbdaddr)"sref">ef="net/i7v4/icmp.c#L640" id="L6407 clas74"line" name="L610"> 610                goto out"sref">peer)7
peer)7
 662sref"7peer)7
 623      d icclass="sref">fl4 *)skb, info)"sref"7ef="net/i7v4/icmp.c#L644" id="L6447 clas74"line" name="L614"> 614sref"7ef="net/i7v4/icmp.c#L645" id="L6457 clas74"line" name="L635"> 633 614sref"7ef="net/ipv4/icmp.c#L646" id="L6467 clas74"line" name="48                return"sref"7ef="net/i7v4/icmp.c#L647" id="L6477 clas7="line" name="L635"> 633oto  614sref"7ef="net/ipv4/icmp.c#L648" id="L6487 clas74"line" name="L668"> 668 TERPRINC_STATS_B+code=ICMP_PORT_UNREAINC_STATS_B+="sref">inet_addr_type(neUNREAMIBAINERRORScode=ICMP_PORT_UNREAMIBAINERRORSnfo" class="sref">info)"sref"7es="sref">
out"sref">ef="net/i7v4/icmp.c#L650" id="L6507 clas7="line10                }sref">peer)7
 651
 662sref"7peer)7
 723/*
)7
 724 725         */
)7
 726
)7
 663static voiredirec  icmp_unreach(struct sk_buff *skb)
RTN_BROADCAST) {
 609     4 *)skb->skb, sizeof(struct RTN_BROADCAST) {
 6L668"> 668 TERPRINC_STATS_B+code=ICMP_PORT_UNREAINC_STATS_B+="sref">inet_addr_ty = dev_net<> *)skbneUNREAMIBAINERRORScode=ICMP_PORT_UNREAMIBAINERRORSnfo" class="sref">info)"sref"7ef="net/i7v4/icmp.c#L661" id="L6617 clas76"line" name="L711"> 748                return"sref"7ef="net/i7v4/icmp.c#L662" id="L6627 clas76"line" name="L582"> 582        }
)7
 733
 734        if (!pskb_may_pull(skb, sizeof(struct iphdr)))
 748                return"sref"7eeer)7
 726
)7
 597      d icclass="sref">fl4 *)skb/a> = icmp_hdr(icmph->un. 582        }
 669
 730/*
)7
 661 732/*
)7v4/icmp.c#L673" id="L6737 clas7="line" name="L673"> 673         *6     Rhavhead ass= sersre thang">swng R7;pI4ass="sn class="comment">/*
 674    48questheaders in upper levels.
 675         *6 D    rece"srdeck      mentECHO 48quest     RbIf you see this message
 676    includrdeck     lass=eaders in upper levels.
)7v4/icmp.c#L677" id="L6777 clas77"line" name="L717"> 717 728    ass= 48questh,     Rhavhe08 =NOTendor to fix their kit.
 729   one: fra" clr eendor to fix their kit.
)7
 660         */
 651
)7
 663static voiass=a href="+code=icmp_hass="ssreref">icmp_unreach(struct sk_buff *skb)
)7
RTN_BROADCAST) {
 667        struct net *net"sref"7ef="net/i7v4/icmp.c#L685" id="L6857 clas78"line" name="L715"> 715
)7
 656 struct net = dev_net(skb_dst(skb)->dev)"sref"7ef="net/i7v4/icmp.c#L687" id="L6877 clas7="line" name="L687"> 734        if (!net->ipv4..RTN_BROADCAST) {
 68666"> 666        stru_bx href="+code=icmp_parbx line"666        stru_p;dev)"sref"7ef="net/i7v4/icmp.c#L689" id="L6897 clas78"line" name="L669"> 669
 6666        stru_p;icmp_paramicmp_pare,  6=ass="sref">icmphdricmp_hdr(skb)"sref"7ef="net/i7v4/icmp.c#L691" id="L6917 clas7="line" name="L691"> 6666        stru_p;icmp_paramicmp_pare, ip>->neUNREAECHOREPLYcode=ICMP_PORT_UNREAECHOREPLYlass class="sref">dev)"sref"7ef="net/i7v4/icmp.c#L692" id="L6927 clas7="line" name="L692"> 6666        stru_p;icmp_pardr( 6s="sref">data_len(dev)"sref"7eeer)7v4/icmp.c#L693" id="L6937 clas7="line" name="L693"> 6666        stru_p;icmp_param. 6s=ass="sref">info = 0"sref"7peer)7
 6666        stru_p;icmp_param. 6s="sref">data_len(skb->info = 0"sref"7pf="net/i7v4/icmp.c#L695" id="L6957 clas7="line" name="L695"> 6666        stru_p;icmp_param. 6s="sref">head_len = sizeof(struct icmphdr)"sref"7ef="net/i7v4/icmp.c#L696" id="L6967 clas7="line" name="L696"> 6"> 663static voireef="+code=icmp_push_replass="sref">icmp_push_reply(&icmp_hdr(skb)"sref"7ef="net/i7v4/icmp.c#L697" id="L6977 clas7="line" name="L582"> 582        }
)7
 582        }
 669
)8
 730/*
 661
)8
 732         *8 MAY i">  32
)8
4/icmp.c#L693" id="L6938 clas80"line" name="L673"> 673
)8
 674        RbI accuclas7;u, cfew minuthouaders in upper levels.
)8
4/icmp.c#L695" id="L6958 clas80"line" name="L675"> 675        RbI upataI4: t leus r t 15Hzuaders in upper levels.
)8
4/icmp.c#L696" id="L6968 clas80"line" name="L676"> 676         */
)8
 663static voi.2.2" nmphref="+code=icmp_par.2.2" nmp"ssreref">icmp_unreach(struct sk_buff *skb)
)8
RTN_BROADCAST) {
icmp_unreach(.2.2"peref="+code=no_pm.2.2"perline"666        t->info = 0"sref"8peer)8
 666        stru_bx href="+code=icmp_parbx line"666        stru_p;dev)"sref"8peer)8
 730/*
 722 723         */
 609     4 *)skb->skb)
)8
 685                goto out_err"sref"8ef="net/i8v4/icmp.c#L716" id="L7168 clas81"line" name="L726"> 726
 727        /*
 718/*
 719         */
 670 getns.2.2ofd>.icmp_push_replyskb)"sref"8ef="net/i8v4/icmp.c#L721" id="L7218 clas82"line" name="L681"> 681     _p;icmp_paramicmp_par.2.2"ef="+code=no_pm.2.2"ata"[1]6s="sref">data_lenhtonef="+code=pskb_mhtone"sref4"> 609     t->icmp_par.v_seref="+code=no_pm.v_ser=len" oadc 86400)asa"sref">icmp_parMSEC_PER_SECef="+code=no_pmMSEC_PER_SEC=len"+class="sref">skb)"sref"8ef="net/i8v4/icmp.c#L722" id="L7228 clas82"line" name="L712"> 712                   "> 609     t->icmp_par.v_nseref="+code=no_pm.v_nser=len"/s="sref">codeSEC_PER_MSECef="+code=no_pm>SEC_PER_MSEC=len" class="sref">skb)"sref"8eeer)8v4/icmp.c#L723" id="L7238 clas82"line" name="L623"> 623      p;icmp_paramicmp_par.2.2"ef="+code=no_pm.2.2"ata"[2]6s="sref">data_len     p;icmp_paramicmp_par.2.2"ef="+code=no_pm.2.2"ata"[1] class="sref">skb)"sref"8ef="net/i8v4/icmp.c#L724" id="L7248 clas82"line" name="L734"> 609     4icmp_hdr(icmp_paramicmp_par.2.2"ef="+code=no_pm.2.2"ata"[0],s4"" class="sref">skb)
 6666        ref="+code=LIMIT_Nass="sre" class="sref">skb)"sref"8ef="net/i8v4/icmp.c#L726" id="L7268 clas82"line" name="L656"> 656 stru_p;icmp_paramicmp_pare,  6=ass="sref">icmphdricmp_hdr(skb)"sref"8ef="net/i8v4/icmp.c#L727" id="L7278 clas82"line" name="L597"> 597      p;icmp_paramicmp_pare, ip>->neUNREAMP_DSTAMPREPLYcode=ICMP_PORT_UNREAMP_DSTAMPREPLY" class="sref">out_err"sref"8ef="net/i8v4/icmp.c#L728" id="L7288 clas82"line" name="L668"> 668      p;icmp_paramicmp_pare, ia>->info = 0"sref"8ef="net/i8v4/icmp.c#L729" id="L7298 clas829line" name="L668"> 668      p;icmp_pardr( 6s="sref">data_len(dev)"sref"8ef="net/i8v4/icmp.c#L730" id="L7308 clas83"line" name="L670"> 670 stru_p;icmp_param. 6s=ass="sref">info = 0"sref"8ef="net/i8v4/icmp.c#L731" id="L7318 clas83"line" name="L681"> 681     _p;icmp_param. 6s=ass="sref">info = 0"sref"8ef="net/i8v4/icmp.c#L732" id="L7328 clas83"line" name="L682"> 682  tru_p;icmp_param. 6s="sref">head_len = sizeof(struct info = 0"sref"8eeer)8v4/icmp.c#L733" id="L7338 clas83"line" name="L623"> 623      reef="+code=icmp_push_replass="sref">icmp_push_reply(&icmp_hdr(skb)"sref"8ef="net/i8v4/icmp.c#L734" id="L7348 clas8="line>                g 614sref"8peer)8
                goto  614sref"8pf="net/i8v4/icmp.c#L737" id="L7378 clas83"line" name="L597"> 597 TERPRINC_STATS_B+code=ICMP_PORT_UNREAINC_STATS_B+="sref">inet_addr_ty = dev_net(skb_dst(skb)->neUNREAMIBAINERRORScode=ICMP_PORT_UNREAMIBAINERRORSnfo" class="sref">info)"sref"8ef="net/i8v4/icmp.c#L738" id="L7388 clas8="line" name="10                goto out"sref"8ss="sref"8codede" c9et_warn_8 871t 582        }
 680
)8
 663static voi claarde=net_warn_ratec voi claard"ssreref">icmp_unreach(struct sk_buff *skb)
)8
RTN_BROADCAST) {
)8
 582        }
 614sref"8ef="net/i8v4/icmp.c#L645" id="L6458 clas84"line" name="L675"> 675/*
 676
 717         */
 666        stru_rc->icmp_unreach(struct sk_buff *skb)
RTN_BROADCAST) {
 666        struct icmphdr *icmph"sref"8peer)8
 666        rtabl>icmphdrgoto netskb_rtabl>icmp_hdr(skb)"sref"8ef="net/i8v4/icmp.c#L652" id="L6528 clas852line" name="8666"> 666        struct net *net = dev_nrgoto skb>(icmp_para)->dev)"sref"8peer)8
 733
)8
 734      xfrm4_policy_     >dev_nNULLef="+code=no_pm>ULLlass="s="sref">icmp_hXFRM_POLICYAINef="+code=no_pmXFRM_POLICYAINlass="s="sref">icmp_hdr(RTN_BROADCAST) {
 6ref">icmp_unreach(secramt> *sk_buffphref="+code=icmsp=net" class="sref">netskb_secramt> *icmp_hdr(skb)"sref"8ef="net/i8
 6in> 666        n> *icmph"sref"8pf="net/i8
 677
 6L734"ss="sref">icmp_hdphref="+code=icmsp=net"s_error_reclass="sref">netsphref="+code=icmsp=net class="sref">skbnetsphref="+code=icmsp=net class="sref">skb->skbicmp_parflag"ef="+code=no_pmflag"=net"s_err" name="L677"> 677
 699           s="sref">icmp_hXFRM_STATEREACHef="+code=no_pmXFRM_STATEREACH=skb"r" name="L677"> 677
 6" name="10              t">/>/ph" class="sref">icmph"sref"8ef="net/i8v4/icmp.c#L661" id="L6618 clas86"line" name="L651"> 651
 7L734"> 734        if (!pskb_may_pull(icmphdr *skb, sizeof(struct iphdr)))
)8
 703  10              t">/>/ph" class="sref">icmph"sref"8eeer)8v4/icmp.c#L664" id="L6648 clas86"line" name="L614"> 614sref"8ef="net/i8v4/icmp.c#L665" id="L6  8     86"line" name="L705"> 7666        n> *netskb_14"" cl_am. class="sref">icmp_hdr(skb)"sref"8eeer)8
 6"> 663statiskb_set_14"" cl_     * *pskb_may_pull(icmphdr *skb)"sref"8ef="net/i8
 677
 6L734"> 734      xfrm4_policy_     _revers>dev_nNULLef="+code=no_pm>ULLlass="s="sref">icmp_hXFRM_POLICYAINef="+code=no_pmXFRM_POLICYAINlass="s="sref">icmp_hdr( 677
 699  10              t">/>/ph" class="sref">icmph"sref"8ef="net/i8v4/icmp.c#L670" id="L6708 clas87"line" name="L680"> 680
)8
 6666        skb_set_14"" cl_     * *pskb_may_pull(        n> *skb)"sref"8ef="net/i8v4/icmp.c#L672" id="L6728 clas87"line" name="L582"> 582        }
)8v4/icmp.c#L673" id="L6738 clas87"line" name="L733"> 733
 597 TERPRINC_STATS_B+code=ICMP_PORT_UNREAINC_STATS_B+="sref">inet_addr_tyt *neUNREAMIBAINMSGScode=ICMP_PORT_UNREAMIBAINMSGSph" " class="sref">skb)"sref"8ef="net/i8v4/icmp.c#L675" id="L6758 clas87"line" name="L715"> 715
 609     4 *)skbRTN_BROADCAST) {
)8v4/icmp.c#L677" id="L6778 clas87"line" name="04              CHECKSUM_COMPLETE+code=net_warn_CHECKSUM_COMPLETE" cl"" name="L614"> 614sref"8ef="net/i8v4/icmp.c#L678" id="L6788 clas87"line" name="L688"> 6L734"> 734      csuh_fol"+code=net_warn_csuh_fol"s="sref">pskb_may_pull(icmph 677
 709                        break"sref"8peer)8
 66 name="L675"> 675         */
 614sref"8peer)8
 6666        ll(icmphinfo = 0"sref"8peer)8
 7L734"> 609     __s 6plet>icmp_hdr( 677
 66666666610              e /a>(icmph"sref"8ef="net/i8v4/icmp.c#L685" id="L6858 clas885line" name="L582"> 582        }
)8
 726
 734      ay_pu href="+code=pskb_may_puclass="sref">pskb_may_pull(icmphdr * 677
 610              e /a>(icmph"sref"8ef="net/i8v4/icmp.c#L689" id="L6898 clas88"line" name="L669"> 669
 670 stru>, data_len     = icmp_hdr(skb)"sref"8ef="net/i8v4/icmp.c#L691" id="L6918 clas89"line" name="L651"> 651
neUNREMSGINRINC_STATS_B+code=ICMP_PORT_UNREMSGINRINC_STATS_B+="sref">inet_addr_tyt *nestru>, icmph->skb)"sref"8eeer)8v4/icmp.c#L693" id="L6938 clas8="line" name="" name="L675"> 675/*
)8
 724 7s a mysterypan class="comment">/*
 725/*
)8v4/icmp.c#L696" id="L6968 clas89"line" name="L676"> 676         * UnknowC37;pI4ass ICMP tsens     RbI siodetlypan class="comment">/*
 717 718         */
 609     stru>, icmph->code >  >          */
)9
 610              e /a>(icmph"sref"9ef="net/i9v4/icmp.c#L701" id="L7019 clas90"line" name="L651"> 651
)9
 662sref"9p3er)9
4/icmp.c#L693" id="L6939 clas90"line" name="" name="L675"> 675/*
)9
 674 675         */
)9
4/icmp.c#L696" id="L6969 clas90"line" name="L726"> 726
)9
dev_nrgoto skbdev_nRTCF == daddrCF MULTI href="+code=RTN_BROACF MULTI hre=skb"ref">RTN_BROADCAST) {
)9
 6" name="L675"> 675/*
)9
4/icmp.c#L699" id="L6999 clas90"line" name="L719"> 719         .6 An  mentECHO       bogus rMAY bIf you see this message
)9
 730)uaders in upper levels.
)9
 731         .8 An  mentMP_DSTAMPrMAY bI siodetlypan class="comment">/*
 722
)9
 723         */
 6L6879"> 609     stru>, icmph->daddr         */
)9
 68"> 6"> 609     stru>, icmph->daddr &&sref"9ef="net/i9v4/icmp.c#L716" id="L7169 clas91"line" name="L696"> 6"> 6"> 609     t *net->ipv4.RTN_BROADCAST) {
 737  10              e /a>(icmph"sref"9ef="net/i9v4/icmp.c#L718" id="L7189 clas91"line" name="L688"> 6L582"> 582        }
 7L609"> 609     stru>, icmph->daddr &&sref"9ef="net/i9v4/icmp.c#L720" id="L7209 clas92"line" name="L610"> 6" na"> 609     stru>, icmph->daddr &&sref"9eeer)9v4/icmp.c#L721" id="L7219 clas92"line" name="L691"> 6" na"> 609     stru>, icmph->daddr &&sref"9ef="net/i9v4/icmp.c#L722" id="L7229 clas92"line" name="L712"> 712 609     stru>, icmph->daddrRTN_BROADCAST) {
)9v4/icmp.c#L723" id="L7239 clas92"line" name="L703"> 703  10              e /a>(icmph"sref"9ef="net/i9v4/icmp.c#L724" id="L7249 clas92"line" name="L694"> 6L582"> 582        }
 582        }
 726
 597      pointere_bogus_error_re     pointereline[lass="sref">netstru>, icmph->icmp_parass="c3/a>(icmp_hdr(skb)"sref"9ef="net/i9v4/icmp.c#L728" id="L7289 clas92"lineclass="sref">skb)"sref"9ef="net/i9v4/icmp.c#L729" id="L7299 clas929line>              t">/>/ph" "" name="L614"> 614sref"9ef="net/i9v4/icmp.c#L730" id="L7309 clas93"line" name="L670"> 670 kfree_dr(icmp_hdr(skb)"sref"9ef="net/i9v4/icmp.c#L731" id="L7319 clas93"line" name="48=ass="sref">info = 0"sref"9ef="net/i9v4/icmp.c#L732" id="L7329 clas93"line>              e /a>( 614sref"9eeer)9v4/icmp.c#L733" id="L7339 clas93"line" name="L623"> 623 TERPRINC_STATS_B+code=ICMP_PORT_UNREAINC_STATS_B+="sref">inet_addr_type(neUNREAMIBAINERRORScode=ICMP_PORT_UNREAMIBAINERRORSnfo" class="sref">info)"sref"9ef="net/i9v4/icmp.c#L734" id="L7349 clas93"line" name="10              t">/>/ph" class="sref">icmph"sref"9peer)9
 582        }
 726
 717/*
 728
de" c9et_warn_8 971t 729         */
 666        stru_controef="+code=pskb_mstru_controeline"L597"> 597      pointere_bogus_error_re     pointereline[lass="sref">net> >  > RTN_BROADCAST) {
)9
netUNREAECHOREPLYcode=ICMP_PORT_UNREAECHOREPLYlass]6s=f">RTN_BROADCAST) {
 7="sref">icmp_parass="c3/a>(data_lenping_rc->RTN_BROADCAST) {
)9
RTN_BROADCAST) {
RTN_BROADCAST) {
)9v4/icmp.c#L645" id="L6459 clas94"line" name="L685"> 6="sref">icmp_parass="c3/a>(data_len      claarde=net_warn_ratec voi claard"ssr"">RTN_BROADCAST) {
 6="sref">icmp_pare /a>(RTN_BROADCAST) {
RTN_BROADCAST) {
RTN_BROADCAST) {
 7="sref">icmp_parass="c3/a>(data_len      claarde=net_warn_ratec voi claard"ssr"">RTN_BROADCAST) {
 6="sref">icmp_pare /a>(RTN_BROADCAST) {
)9
RTN_BROADCAST) {
netUNREADEST_UNREAC+code=ICMP_PORT_UNREADEST_UNREAC+lass]6s=f">RTN_BROADCAST) {
)9
 7="sref">icmp_parass="c3/a>(data_len     unreac>, RTN_BROADCAST) {
 6="sref">icmp_pare /a>(RTN_BROADCAST) {
)9v4/icmp.c#L655" id="L6559 clas95"line" name="}"">RTN_BROADCAST) {
netUNREASOURCE_QUENC+code=ICMP_PORT_UNREASOURCE_QUENC+lass]6s=f">RTN_BROADCAST) {
 7="sref">icmp_parass="c3/a>(data_len     unreac>, RTN_BROADCAST) {
 6="sref">icmp_pare /a>(RTN_BROADCAST) {
RTN_BROADCAST) {
netUNREAREDIRECef="+code=RTN_BRUNREAREDIRECelass]6s=f">RTN_BROADCAST) {
 6="sref">icmp_parass="c3/a>(data_len     redirec(RTN_BROADCAST) {
 7="sref">icmp_pare /a>(RTN_BROADCAST) {
)9
RTN_BROADCAST) {
)9v4/icmp.c#L664" id="L6649 clas96"line" name="[6]6s=f">RTN_BROADCAST) {
)9v4/icmp.c#L665" id="L6  9     96"line" name="L705"> 7="sref">icmp_parass="c3/a>(data_len      claarde=net_warn_ratec voi claard"ssr"">RTN_BROADCAST) {
)9
 6="sref">icmp_pare /a>(RTN_BROADCAST) {
RTN_BROADCAST) {
RTN_BROADCAST) {
 6="sref">icmp_parass="c3/a>(data_len      claarde=net_warn_ratec voi claard"ssr"">RTN_BROADCAST) {
 6="sref">icmp_pare /a>(RTN_BROADCAST) {
)9
RTN_BROADCAST) {
netUNREAECHOcode=ICMP_PORT_UNREAECHO=net]6s=f">RTN_BROADCAST) {
)9v4/icmp.c#L673" id="L6739 clas97"line" name="L703"> 7="sref">icmp_parass="c3/a>(data_len     ass=a href="+code=icmp_hass="ssr"">RTN_BROADCAST) {
)9v4/icmp.c#L674" id="L6749 clas97"line" name="}"">RTN_BROADCAST) {
)9v4/icmp.c#L675" id="L6759 clas97"line" name="[9]6s=f">RTN_BROADCAST) {
)9v4/icmp.c#L676" id="L6769 clas97"line" name="L696"> 6="sref">icmp_parass="c3/a>(data_len      claarde=net_warn_ratec voi claard"ssr"">RTN_BROADCAST) {
 7="sref">icmp_pare /a>(RTN_BROADCAST) {
RTN_BROADCAST) {
RTN_BROADCAST) {
)9
 6="sref">icmp_parass="c3/a>(data_len      claarde=net_warn_ratec voi claard"ssr"">RTN_BROADCAST) {
 6="sref">icmp_pare /a>(RTN_BROADCAST) {
)9
RTN_BROADCAST) {
)9
netUNREAMP_D_EXCEEDEDcode=ICMP_PORT_UNREAMP_D_EXCEEDED=net]6s=f">RTN_BROADCAST) {
 6="sref">icmp_parass="c3/a>(data_len     unreac>, RTN_BROADCAST) {
 7="sref">icmp_pare /a>(RTN_BROADCAST) {
)9
RTN_BROADCAST) {
netUNREAPARAMETERPROBcode=ICMP_PORT_UNREAPARAMETERPROB=net]6s=f">RTN_BROADCAST) {
 6="sref">icmp_parass="c3/a>(data_len     unreac>, RTN_BROADCAST) {
 6="sref">icmp_pare /a>(RTN_BROADCAST) {
RTN_BROADCAST) {
netUNREAMP_DSTAMPcode=ICMP_PORT_UNREAMP_DSTAMPph" ]6s=f">RTN_BROADCAST) {
 7="sref">icmp_parass="c3/a>(data_lene=ic .2.2" nmphref="+code=icmp_par.2.2" nmp"ssr"">RTN_BROADCAST) {
)9v4/icmp.c#L693" id="L6939 clas99"line" name="}"">RTN_BROADCAST) {
)9
netUNREAMP_DSTAMPREPLYcode=ICMP_PORT_UNREAMP_DSTAMPREPLY" cl]6s=f">RTN_BROADCAST) {
 6="sref">icmp_parass="c3/a>(data_len      claarde=net_warn_ratec voi claard"ssr"">RTN_BROADCAST) {
)9v4/icmp.c#L696" id="L6969 clas996line" name="}"">RTN_BROADCAST) {
netUNREAINFO_REQUEref="+code=RTN_BRUNREAINFO_REQUEre" cl]6s=f">RTN_BROADCAST) {
 6="sref">icmp_parass="c3/a>(data_len      claarde=net_warn_ratec voi claard"ssr"">RTN_BROADCAST) {
RTN_BROADCAST) {
)10peercmp.c#L699" id="L69910pee>10peline" name="[lass="sref">netUNREAINFO_REPLYcode=ICMP_PORT_UNREAINFO_REPLY" cl]6s=f">/pre>87/76/272baed13fbbfc5d36a5e6b11b51779ab398_3/10pee>>RTN_BROADCAST) {
)10p4/icmp.c#L691" id="L69110p4/>10p"line" name="L691"> 6="sref">icmp_parass="c3/a>(data_len      claarde=net_warn_ratec voi claard"ssr"">RTN_BROADCAST) {
)10p4/icmp.c#L692" id="L69210p4/>10p"line" name="}"">RTN_BROADCAST) {
)10p4/icmp.c#L693" id="L69310p4/>10p"line" name="[lass="sref">netUNREAADDRESScode=ICMP_PORT_UNREAADDRESSph" ]6s=f">RTN_BROADCAST) {
)10p 6="sref">icmp_parass="c3/a>(data_len      claarde=net_warn_ratec voi claard"ssr"">RTN_BROADCAST) {
)10p4/icmp.c#L695" id="L69510p4/>10p"line" name="}"">RTN_BROADCAST) {
)10p4/icmp.c#L696" id="L69610p4/>10p"line" name="[lass="sref">netUNREAADDRESSREPLYcode=ICMP_PORT_UNREAADDRESSREPLYph" ]6s=f">RTN_BROADCAST) {
)10p4/icmp.c#L697" id="L69710p4/>10p"line" name="L737"> 7="sref">icmp_parass="c3/a>(data_len      claarde=net_warn_ratec voi claard"ssr"">RTN_BROADCAST) {
)10pRTN_BROADCAST) {
)10p4/icmp.c#L699" id="L69910p4/>10p"lineLclass="sref">icmph"sref"101eer)10
icmph"sref"1011er)10
 663stati__14"_exi(data_len     sk_exi(skb, sizeof(pe(net *         */
)10v4/icmp.c#L712" id="L71210v4/>10
"linef">RTN_BROADCAST) {
)10
icmph"sref"1014er)10v4/icmp.c#L714" id="L71410v4/>10
"line" name="L614"> 614sref"10
5er)10
_possible_cpuline"666        s/a>(         */
)10v4/icmp.c#L716" id="L71610v4/>10
"line" name="L696"> 6"> 663statii14"_nsessock_d2" ro="+code=icmp_push14"_nsessock_d2" ro=line"666        t *net->ip     sk/a>(nets/a>(info)"sref"10
7er)10v4/icmp.c#L717" id="L71710v4/>10
"line" name="L597"> 597 kfree/a>(        t *net->ip     sk/a>(info)"sref"10
8er)10v4/icmp.c#L718" id="L71810v4/>10
"line" name="L668"> 668 t *net->ip     sk/a>(data_lenNULLef="+code=no_pm>ULLlassclass="sref">info)"sref"10
9er)10v4/icmp.c#L719" id="L71910v4/>10
"lineL582"> 582        }
)10v4/icmp.c#L720" id="L72010v4/>10v4line" name="L614"> 614sref"1021er)10v4/icmp.c#L721" id="L72110v4/>10v"line" name=in> 666        __14"_inio/a>(data_len     sk_inio/a>(skb, sizeof(pe(net *         */
)10v4/icmp.c#L722" id="L72210v4/>10v"linef">RTN_BROADCAST) {
)10v4/icmp.c#L723" id="L72310v4/>10v"line" name="in> 666        s/a>(neto info)"sref"1024er)10v4/icmp.c#L724" id="L72410v4/>10v"line" name="L614"> 614sref"1025er)10v4/icmp.c#L725" id="L72510v4/>10v"line" name="666        t *net->ip     sk/a>( 614sref"1026er)10v4/icmp.c#L726" id="L72610v4/>10v"line" name="L696"> 6"> 663statikzalloref="+code=no_pmkzallorline"666        tr_cpu_ide_bogus_error_retr_cpu_ide=net"  class="sref">skb, sizeof(sock_bogus_error_resock=net" "" class="sref">neGFP_KERNELef="+code=no_pmGFP_KERNEL;
<" class="sref">info)"sref"1027er)10v4/icmp.c#L727" id="L72710v4/>10v"line" name="L687ss="sref">dev_nt *net->ip     sk/a>(data_lenNULLef="+code=no_pm>ULLlass"nt">         */
)10v4/icmp.c#L728" id="L72810v4/>10v"line" name="L688"> 648=-"sref">data_lenENOMEMef="+code=no_pmENOMEM" clclass="sref">info)"sref"1029er)10v4/icmp.c#L729" id="L72910v4/>10v"line" name="L669"> 669
)10v4/icmp.c#L730" id="L73010v4/>10v4line" name="666        for_eac>_possible_cpu/a>(        s/a>(RTN_BROADCAST) {
)10v4/icmp.c#L731" id="L73110v4/>10v"line" name="L691"> 6sref">skb, sizeof(sock_bogus_error_resock=net" kb, sizeof(sk_bogus_error_resk" clclass="sref">info)"sref"1032er)10v4/icmp.c#L732" id="L73210v4/>10v"line" name="L662"> 662sref"10v3er)10v4/icmp.c#L733" id="L73310v4/>10v"line" name="L703"> 7class="sref">neto data_len 14"_nsessock_creat>icmp_push_replynePFAINEef="+code=RTN_BRPFAINEe"ssr"">RTN_BROADCAST) {
)10v4/icmp.c#L734" id="L73410v4/>10v"line" name="L694"> 6666666666666666666666666666class="sref">neSOCK_RAWf="+code=RTN_BRSOCK_RAW" cl" class="sref">neIPPROTOREACHef="+code=no_pmIPPROTOREACH" cl" class="sref">net *info)"sref"1035er)10
 6L687ss="sref">dev_nto          */
)10v4/icmp.c#L736" id="L73610v4/>10v"line" name="L696"> 6"> 6666610              faief="+code=pskb_mfaie" clclass="sref">info)"sref"1037er)10v4/icmp.c#L737" id="L73710v4/>10v"line" name="L677"> 677
)10v4/icmp.c#L738" id="L73810v4/>10v"line" name="L688"> 6"s="sref">dev_nt *net->ip     sk/a>(nets/a>(netsk_bogus_error_resk" clclass="sref">info)"sref"1039er)10codede" c9et_warn_8 10cod>10v"line" name="L669"> 669
)10v4/icmp.c#L640" id="L64010v4/>10v4line" name="L688"> 6" name="L675"> 675         */
)10
 731sover    uaders in upper levels.
)10
 722         */
)10
 7class="sref">nesk_bogus_error_resk" cl" class="sref">netneSKB_TRUESIZEf="+code=RTN_BRSKB_TRUESIZEline"64ass10v""class="sref">info)"sref"1044er)10v4/icmp.c#L644" id="L64410v4/>10v"line" name="L614"> 614sref"1045er)10v4/icmp.c#L645" id="L64510v4/>10v"line" name="L705"> 76 name="L717"> 717/*
)10v4/icmp.c#L646" id="L64610v4/>10v"line" name="L676"> 676/*
)10v4/icmp.c#L647" id="L64710v4/>10v"line" name="L717"> 717         */
)10v4/icmp.c#L648" id="L64810v4/>10v"line" name="L688"> 6"s="sref">dev_nsock_set_flag_bogus_error_resock_set_flagline"666        sk_bogus_error_resk" cl" class="sref">neSOCK_USE_WRITE_QUEUEf="+code=RTN_BRSOCK_USE_WRITE_QUEUE=net"class="sref">info)"sref"1049er)10
 6"sref">data_len 14"_sk/a>(        sk_bogus_error_resk" cl) class="sref">skbdata_lenIP_PMTUDISC_DONef="+code=RTN_BRUP_PMTUDISC_DONe" clclass="sref">info)"sref"105eer)10v4/icmp.c#L650" id="L65010v4/>10v4line" name="}lass="sref">info)"sref"1051er)10
 651
)10v4/icmp.c#L652" id="L65210v4/>10v"line" name="c name="L675"> 675         */
)10
 623 t *net->ipsponses" claass=ass="srearef="+code=pskb_msponses" claass=ass="sreare" cl9s=ass="sref">info = 0"sref"10v4er)10
 597 t *net->ipsponses" claass=ass="sre   bogus e_bogus_error_responses" claass=ass="sre   bogus eph" 9s=1ss="sref">info = 0"sref"10v5er)10v4/icmp.c#L655" id="L65510v4/>10v"line" name="L715"> 715
)10
 675         */
)10
 597 t *net->ipsponses" class="sre ogus_e _responses_bogus_error_responses" class="sre ogus_e _responsesph" 9s=1ss="sref">info = 0"sref"10v8er)10v4/icmp.c#L658" id="L65810v4/>10v"lineclass="sref">skb)"sref"10v9er)10v4/icmp.c#L659" id="L65910v4/>10v9line" name="c name="L675"> 675         */
)10v4/icmp.c#L660" id="L66010v4/>10v4line" name="L717"> 717 731         */
)10v4/icmp.c#L662" id="L66210v4/>10v"line" name="L722"> 722         */
)10
 723
 tsens aremratelimi ed bypan class="comment">/*
)10v4/icmp.c#L664" id="L66410v4/>10v"line" name="L674"> 674 725/*
)10
 676/*
)10
 717abl& (3), source quench344),pan class="comment">/*
)10
 718/*
)10
 719         */
)10v4/icmp.c#L670" id="L67010v4/>10v4lineclass="sref">skb)"sref"1071er)10
 597 t *net->ipsponses" claratelimi _bogus_error_responses" claratelimi ph" 9s=1assclass="sref">neHZ_bogus_error_reHZ" clclass="sref">info)"sref"1072er)10v4/icmp.c#L672" id="L67210v4/>10v"line" name="class="sref">net *net->ipsponses" claratemask_bogus_error_responses" claratemask" cl9s=ax1818class="sref">info)"sref"1073er)10v4/icmp.c#L673" id="L67310v4/>10v"line" name="L623"> 623 t *net->ipsponses" claa s_use_inbound_ifad info = 0"sref"1074er)10v4/icmp.c#L674" id="L67410v4/>10v"line" name="L614"> 614sref"1075er)10v4/icmp.c#L675" id="L67510v4/>10v"line" name="48=ass="sref">info = 0"sref"10v6er)10v4/icmp.c#L676" id="L67610v4/>10v"line" name="L726"> 726
)10v4/icmp.c#L677" id="L67710v4/>10v"line"              faief="+code=pskb_mfaie" cl"" name="L614"> 614sref"10v8er)10v4/icmp.c#L678" id="L67810v4/>10v"line" name="L668"> 668 for_eac>_possible_cpu/a>(        s/a>(         */
)10v4/icmp.c#L679" id="L67910v4/>10v"line" name="L699"> 6"sref">data_len 14"_nsessock_d2" ro="+code=icmp_push14"_nsessock_d2" ro=line"666        t *net->ip     sk/a>(nets/a>(info)"sre h108eer)10
 668 kfree/a>(        t *net->ip     sk/a>(info)"sref"1081er)10v4/icmp.c#L681" id="L68110v4/>10
"line" name="48=ss="sref">dev_nto info)"sref"1082er)10
info)"sref"1083er)10
 726
)10v4/icmp.c#L684" id="L68410v4/>10
i;
<"" name=sref">skb, sizeof(per14"_operaot;&s_bogus_error_reper14"_operaot;&sline"kb, sizeof(__14"_iniodata_bogus_error_re__14"_iniodataline"kb, sizeof(     sk_ope_bogus_error_re     sk_ope" cl9s=f">RTN_BROADCAST) {
)10v4/icmp.c#L685" id="L68510v4/>10
"line" name= class="sref">ip nio/a>(, sizeof(     sk_inio/a>(RTN_BROADCAST) {
)10
ipexi(, sizeof(     sk_exi(RTN_BROADCAST) {
)10v4/icmp.c#L687" id="L68710v4/>10
"lineLclass="sref">icmph"sref"1088er)10v4/icmp.c#L688" id="L68810v4/>10
"lineclass="sref">skb)"sref"1089er)10v4/icmp.c#L689" id="L68910v4/>10
"linein> 666        __inio/a>(data_len     inio/a>(         */
)10v4/icmp.c#L690" id="L69010v4/>10v4linef">RTN_BROADCAST) {
)10v4/icmp.c#L691" id="L69110v4/>10v"line" name="48=ss="sref">dev_nregister_per14"_subspo/a>(icmp_push_replyinfo)"sref"1092er)10v4/icmp.c#L692" id="L69210v4/>10v"line}lass="sref">info)"sref"1093er)10v4/icmp.c#L693" id="L69310v4/>10v"line"/pre>
The original LXR softwaremby bot ass="srefhttp://sourceforge.">inprojects/lxr">LXR > 71unioy" cl" thit experi19lxr@693ux.no; <" lxr.693ux.no kindly hos ed by ass="srefhttp://www.redpill-693pro.no">Redpill L93pro AS" cl" provider#of L93ux=consultr enand operaot;&s services since 1995.