The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/netinet/ip_fastfwd.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 2003 Andre Oppermann, Internet Business Solutions AG
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  * 1. Redistributions of source code must retain the above copyright
    9  *    notice, this list of conditions and the following disclaimer.
   10  * 2. Redistributions in binary form must reproduce the above copyright
   11  *    notice, this list of conditions and the following disclaimer in the
   12  *    documentation and/or other materials provided with the distribution.
   13  * 3. The name of the author may not be used to endorse or promote
   14  *    products derived from this software without specific prior written
   15  *    permission.
   16  *
   17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   27  * SUCH DAMAGE.
   28  *
   29  * $FreeBSD$
   30  */
   31 
   32 /*
   33  * ip_fastforward gets its speed from processing the forwarded packet to
   34  * completion (if_output on the other side) without any queues or netisr's.
   35  * The receiving interface DMAs the packet into memory, the upper half of
   36  * driver calls ip_fastforward, we do our routing table lookup and directly
   37  * send it off to the outgoing interface, which DMAs the packet to the
   38  * network card. The only part of the packet we touch with the CPU is the
   39  * IP header (unless there are complex firewall rules touching other parts
   40  * of the packet, but that is up to you). We are essentially limited by bus
   41  * bandwidth and how fast the network card/driver can set up receives and
   42  * transmits.
   43  *
   44  * We handle basic errors, IP header errors, checksum errors,
   45  * destination unreachable, fragmentation and fragmentation needed and
   46  * report them via ICMP to the sender.
   47  *
   48  * Else if something is not pure IPv4 unicast forwarding we fall back to
   49  * the normal ip_input processing path. We should only be called from
   50  * interfaces connected to the outside world.
   51  *
   52  * Firewalling is fully supported including divert, ipfw fwd and ipfilter
   53  * ipnat and address rewrite.
   54  *
   55  * IPSEC is not supported if this host is a tunnel broker. IPSEC is
   56  * supported for connections to/from local host.
   57  *
   58  * We try to do the least expensive (in CPU ops) checks and operations
   59  * first to catch junk with as little overhead as possible.
   60  * 
   61  * We take full advantage of hardware support for IP checksum and
   62  * fragmentation offloading.
   63  *
   64  * We don't do ICMP redirect in the fast forwarding path. I have had my own
   65  * cases where two core routers with Zebra routing suite would send millions
   66  * ICMP redirects to connected hosts if the destination router was not the
   67  * default gateway. In one case it was filling the routing table of a host
   68  * with approximately 300.000 cloned redirect entries until it ran out of
   69  * kernel memory. However the networking code proved very robust and it didn't
   70  * crash or fail in other ways.
   71  */
   72 
   73 /*
   74  * Many thanks to Matt Thomas of NetBSD for basic structure of ip_flow.c which
   75  * is being followed here.
   76  */
   77 
   78 #include "opt_ipfw.h"
   79 #include "opt_ipstealth.h"
   80 
   81 #include <sys/param.h>
   82 #include <sys/systm.h>
   83 #include <sys/kernel.h>
   84 #include <sys/malloc.h>
   85 #include <sys/mbuf.h>
   86 #include <sys/protosw.h>
   87 #include <sys/socket.h>
   88 #include <sys/sysctl.h>
   89 
   90 #include <net/pfil.h>
   91 #include <net/if.h>
   92 #include <net/if_types.h>
   93 #include <net/if_var.h>
   94 #include <net/if_dl.h>
   95 #include <net/route.h>
   96 
   97 #include <netinet/in.h>
   98 #include <netinet/in_systm.h>
   99 #include <netinet/in_var.h>
  100 #include <netinet/ip.h>
  101 #include <netinet/ip_var.h>
  102 #include <netinet/ip_icmp.h>
  103 
  104 #include <machine/in_cksum.h>
  105 
  106 static int ipfastforward_active = 0;
  107 SYSCTL_INT(_net_inet_ip, OID_AUTO, fastforwarding, CTLFLAG_RW,
  108     &ipfastforward_active, 0, "Enable fast IP forwarding");
  109 
  110 static struct sockaddr_in *
  111 ip_findroute(struct route *ro, struct in_addr dest, struct mbuf *m)
  112 {
  113         struct sockaddr_in *dst;
  114         struct rtentry *rt;
  115 
  116         /*
  117          * Find route to destination.
  118          */
  119         bzero(ro, sizeof(*ro));
  120         dst = (struct sockaddr_in *)&ro->ro_dst;
  121         dst->sin_family = AF_INET;
  122         dst->sin_len = sizeof(*dst);
  123         dst->sin_addr.s_addr = dest.s_addr;
  124         rtalloc_ign(ro, RTF_CLONING);
  125 
  126         /*
  127          * Route there and interface still up?
  128          */
  129         rt = ro->ro_rt;
  130         if (rt && (rt->rt_flags & RTF_UP) &&
  131             (rt->rt_ifp->if_flags & IFF_UP) &&
  132             (rt->rt_ifp->if_drv_flags & IFF_DRV_RUNNING)) {
  133                 if (rt->rt_flags & RTF_GATEWAY)
  134                         dst = (struct sockaddr_in *)rt->rt_gateway;
  135         } else {
  136                 ipstat.ips_noroute++;
  137                 ipstat.ips_cantforward++;
  138                 if (rt)
  139                         RTFREE(rt);
  140                 icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, 0);
  141                 return NULL;
  142         }
  143         return dst;
  144 }
  145 
  146 /*
  147  * Try to forward a packet based on the destination address.
  148  * This is a fast path optimized for the plain forwarding case.
  149  * If the packet is handled (and consumed) here then we return 1;
  150  * otherwise 0 is returned and the packet should be delivered
  151  * to ip_input for full processing.
  152  */
  153 int
  154 ip_fastforward(struct mbuf *m)
  155 {
  156         struct ip *ip;
  157         struct mbuf *m0 = NULL;
  158         struct route ro;
  159         struct sockaddr_in *dst = NULL;
  160         struct ifnet *ifp;
  161         struct in_addr odest, dest;
  162         u_short sum, ip_len;
  163         int error = 0;
  164         int hlen, mtu;
  165 #ifdef IPFIREWALL_FORWARD
  166         struct m_tag *fwd_tag;
  167 #endif
  168 
  169         /*
  170          * Are we active and forwarding packets?
  171          */
  172         if (!ipfastforward_active || !ipforwarding)
  173                 return 0;
  174 
  175         M_ASSERTVALID(m);
  176         M_ASSERTPKTHDR(m);
  177 
  178         ro.ro_rt = NULL;
  179 
  180         /*
  181          * Step 1: check for packet drop conditions (and sanity checks)
  182          */
  183 
  184         /*
  185          * Is entire packet big enough?
  186          */
  187         if (m->m_pkthdr.len < sizeof(struct ip)) {
  188                 ipstat.ips_tooshort++;
  189                 goto drop;
  190         }
  191 
  192         /*
  193          * Is first mbuf large enough for ip header and is header present?
  194          */
  195         if (m->m_len < sizeof (struct ip) &&
  196            (m = m_pullup(m, sizeof (struct ip))) == NULL) {
  197                 ipstat.ips_toosmall++;
  198                 return 1;       /* mbuf already free'd */
  199         }
  200 
  201         ip = mtod(m, struct ip *);
  202 
  203         /*
  204          * Is it IPv4?
  205          */
  206         if (ip->ip_v != IPVERSION) {
  207                 ipstat.ips_badvers++;
  208                 goto drop;
  209         }
  210 
  211         /*
  212          * Is IP header length correct and is it in first mbuf?
  213          */
  214         hlen = ip->ip_hl << 2;
  215         if (hlen < sizeof(struct ip)) { /* minimum header length */
  216                 ipstat.ips_badlen++;
  217                 goto drop;
  218         }
  219         if (hlen > m->m_len) {
  220                 if ((m = m_pullup(m, hlen)) == 0) {
  221                         ipstat.ips_badhlen++;
  222                         return 1;
  223                 }
  224                 ip = mtod(m, struct ip *);
  225         }
  226 
  227         /*
  228          * Checksum correct?
  229          */
  230         if (m->m_pkthdr.csum_flags & CSUM_IP_CHECKED)
  231                 sum = !(m->m_pkthdr.csum_flags & CSUM_IP_VALID);
  232         else {
  233                 if (hlen == sizeof(struct ip))
  234                         sum = in_cksum_hdr(ip);
  235                 else
  236                         sum = in_cksum(m, hlen);
  237         }
  238         if (sum) {
  239                 ipstat.ips_badsum++;
  240                 goto drop;
  241         }
  242 
  243         /*
  244          * Remember that we have checked the IP header and found it valid.
  245          */
  246         m->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID);
  247 
  248         ip_len = ntohs(ip->ip_len);
  249 
  250         /*
  251          * Is IP length longer than packet we have got?
  252          */
  253         if (m->m_pkthdr.len < ip_len) {
  254                 ipstat.ips_tooshort++;
  255                 goto drop;
  256         }
  257 
  258         /*
  259          * Is packet longer than IP header tells us? If yes, truncate packet.
  260          */
  261         if (m->m_pkthdr.len > ip_len) {
  262                 if (m->m_len == m->m_pkthdr.len) {
  263                         m->m_len = ip_len;
  264                         m->m_pkthdr.len = ip_len;
  265                 } else
  266                         m_adj(m, ip_len - m->m_pkthdr.len);
  267         }
  268 
  269         /*
  270          * Is packet from or to 127/8?
  271          */
  272         if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET ||
  273             (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) {
  274                 ipstat.ips_badaddr++;
  275                 goto drop;
  276         }
  277 
  278 #ifdef ALTQ
  279         /*
  280          * Is packet dropped by traffic conditioner?
  281          */
  282         if (altq_input != NULL && (*altq_input)(m, AF_INET) == 0)
  283                 return 1;
  284 #endif
  285 
  286         /*
  287          * Step 2: fallback conditions to normal ip_input path processing
  288          */
  289 
  290         /*
  291          * Only IP packets without options
  292          */
  293         if (ip->ip_hl != (sizeof(struct ip) >> 2)) {
  294                 if (ip_doopts == 1)
  295                         return 0;
  296                 else if (ip_doopts == 2) {
  297                         icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_FILTER_PROHIB,
  298                                 0, 0);
  299                         return 1;
  300                 }
  301                 /* else ignore IP options and continue */
  302         }
  303 
  304         /*
  305          * Only unicast IP, not from loopback, no L2 or IP broadcast,
  306          * no multicast, no INADDR_ANY
  307          *
  308          * XXX: Probably some of these checks could be direct drop
  309          * conditions.  However it is not clear whether there are some
  310          * hacks or obscure behaviours which make it neccessary to
  311          * let ip_input handle it.  We play safe here and let ip_input
  312          * deal with it until it is proven that we can directly drop it.
  313          */
  314         if ((m->m_flags & (M_BCAST|M_MCAST)) ||
  315             (m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK) ||
  316             ntohl(ip->ip_src.s_addr) == (u_long)INADDR_BROADCAST ||
  317             ntohl(ip->ip_dst.s_addr) == (u_long)INADDR_BROADCAST ||
  318             IN_MULTICAST(ntohl(ip->ip_src.s_addr)) ||
  319             IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) ||
  320             ip->ip_src.s_addr == INADDR_ANY ||
  321             ip->ip_dst.s_addr == INADDR_ANY )
  322                 return 0;
  323 
  324         /*
  325          * Is it for a local address on this host?
  326          */
  327         if (in_localip(ip->ip_dst))
  328                 return 0;
  329 
  330         ipstat.ips_total++;
  331 
  332         /*
  333          * Step 3: incoming packet firewall processing
  334          */
  335 
  336         /*
  337          * Convert to host representation
  338          */
  339         ip->ip_len = ntohs(ip->ip_len);
  340         ip->ip_off = ntohs(ip->ip_off);
  341 
  342         odest.s_addr = dest.s_addr = ip->ip_dst.s_addr;
  343 
  344         /*
  345          * Run through list of ipfilter hooks for input packets
  346          */
  347         if (inet_pfil_hook.ph_busy_count == -1)
  348                 goto passin;
  349 
  350         if (pfil_run_hooks(&inet_pfil_hook, &m, m->m_pkthdr.rcvif, PFIL_IN, NULL) ||
  351             m == NULL)
  352                 return 1;
  353 
  354         M_ASSERTVALID(m);
  355         M_ASSERTPKTHDR(m);
  356 
  357         ip = mtod(m, struct ip *);      /* m may have changed by pfil hook */
  358         dest.s_addr = ip->ip_dst.s_addr;
  359 
  360         /*
  361          * Destination address changed?
  362          */
  363         if (odest.s_addr != dest.s_addr) {
  364                 /*
  365                  * Is it now for a local address on this host?
  366                  */
  367                 if (in_localip(dest))
  368                         goto forwardlocal;
  369                 /*
  370                  * Go on with new destination address
  371                  */
  372         }
  373 #ifdef IPFIREWALL_FORWARD
  374         if (m->m_flags & M_FASTFWD_OURS) {
  375                 /*
  376                  * ipfw changed it for a local address on this host.
  377                  */
  378                 goto forwardlocal;
  379         }
  380 #endif /* IPFIREWALL_FORWARD */
  381 
  382 passin:
  383         /*
  384          * Step 4: decrement TTL and look up route
  385          */
  386 
  387         /*
  388          * Check TTL
  389          */
  390 #ifdef IPSTEALTH
  391         if (!ipstealth) {
  392 #endif
  393         if (ip->ip_ttl <= IPTTLDEC) {
  394                 icmp_error(m, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS, 0, 0);
  395                 return 1;
  396         }
  397 
  398         /*
  399          * Decrement the TTL and incrementally change the IP header checksum.
  400          * Don't bother doing this with hw checksum offloading, it's faster
  401          * doing it right here.
  402          */
  403         ip->ip_ttl -= IPTTLDEC;
  404         if (ip->ip_sum >= (u_int16_t) ~htons(IPTTLDEC << 8))
  405                 ip->ip_sum -= ~htons(IPTTLDEC << 8);
  406         else
  407                 ip->ip_sum += htons(IPTTLDEC << 8);
  408 #ifdef IPSTEALTH
  409         }
  410 #endif
  411 
  412         /*
  413          * Find route to destination.
  414          */
  415         if ((dst = ip_findroute(&ro, dest, m)) == NULL)
  416                 return 1;       /* icmp unreach already sent */
  417         ifp = ro.ro_rt->rt_ifp;
  418 
  419         /*
  420          * Immediately drop blackholed traffic, and directed broadcasts
  421          * for either the all-ones or all-zero subnet addresses on
  422          * locally attached networks.
  423          */
  424         if ((ro.ro_rt->rt_flags & (RTF_BLACKHOLE|RTF_BROADCAST)) != 0)
  425                 goto drop;
  426 
  427         /*
  428          * Step 5: outgoing firewall packet processing
  429          */
  430 
  431         /*
  432          * Run through list of hooks for output packets.
  433          */
  434         if (inet_pfil_hook.ph_busy_count == -1)
  435                 goto passout;
  436 
  437         if (pfil_run_hooks(&inet_pfil_hook, &m, ifp, PFIL_OUT, NULL) || m == NULL) {
  438                 goto consumed;
  439         }
  440 
  441         M_ASSERTVALID(m);
  442         M_ASSERTPKTHDR(m);
  443 
  444         ip = mtod(m, struct ip *);
  445         dest.s_addr = ip->ip_dst.s_addr;
  446 
  447         /*
  448          * Destination address changed?
  449          */
  450 #ifndef IPFIREWALL_FORWARD
  451         if (odest.s_addr != dest.s_addr) {
  452 #else
  453         fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL);
  454         if (odest.s_addr != dest.s_addr || fwd_tag != NULL) {
  455 #endif /* IPFIREWALL_FORWARD */
  456                 /*
  457                  * Is it now for a local address on this host?
  458                  */
  459 #ifndef IPFIREWALL_FORWARD
  460                 if (in_localip(dest)) {
  461 #else
  462                 if (m->m_flags & M_FASTFWD_OURS || in_localip(dest)) {
  463 #endif /* IPFIREWALL_FORWARD */
  464 forwardlocal:
  465                         /*
  466                          * Return packet for processing by ip_input().
  467                          * Keep host byte order as expected at ip_input's
  468                          * "ours"-label.
  469                          */
  470                         m->m_flags |= M_FASTFWD_OURS;
  471                         if (ro.ro_rt)
  472                                 RTFREE(ro.ro_rt);
  473                         return 0;
  474                 }
  475                 /*
  476                  * Redo route lookup with new destination address
  477                  */
  478 #ifdef IPFIREWALL_FORWARD
  479                 if (fwd_tag) {
  480                         dest.s_addr = ((struct sockaddr_in *)
  481                                     (fwd_tag + 1))->sin_addr.s_addr;
  482                         m_tag_delete(m, fwd_tag);
  483                 }
  484 #endif /* IPFIREWALL_FORWARD */
  485                 RTFREE(ro.ro_rt);
  486                 if ((dst = ip_findroute(&ro, dest, m)) == NULL)
  487                         return 1;       /* icmp unreach already sent */
  488                 ifp = ro.ro_rt->rt_ifp;
  489         }
  490 
  491 passout:
  492         /*
  493          * Step 6: send off the packet
  494          */
  495 
  496         /*
  497          * Check if route is dampned (when ARP is unable to resolve)
  498          */
  499         if ((ro.ro_rt->rt_flags & RTF_REJECT) &&
  500             (ro.ro_rt->rt_rmx.rmx_expire == 0 ||
  501             time_second < ro.ro_rt->rt_rmx.rmx_expire)) {
  502                 icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, 0);
  503                 goto consumed;
  504         }
  505 
  506 #ifndef ALTQ
  507         /*
  508          * Check if there is enough space in the interface queue
  509          */
  510         if ((ifp->if_snd.ifq_len + ip->ip_len / ifp->if_mtu + 1) >=
  511             ifp->if_snd.ifq_maxlen) {
  512                 ipstat.ips_odropped++;
  513                 /* would send source quench here but that is depreciated */
  514                 goto drop;
  515         }
  516 #endif
  517 
  518         /*
  519          * Check if media link state of interface is not down
  520          */
  521         if (ifp->if_link_state == LINK_STATE_DOWN) {
  522                 icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, 0);
  523                 goto consumed;
  524         }
  525 
  526         /*
  527          * Check if packet fits MTU or if hardware will fragment for us
  528          */
  529         if (ro.ro_rt->rt_rmx.rmx_mtu)
  530                 mtu = min(ro.ro_rt->rt_rmx.rmx_mtu, ifp->if_mtu);
  531         else
  532                 mtu = ifp->if_mtu;
  533 
  534         if (ip->ip_len <= mtu ||
  535             (ifp->if_hwassist & CSUM_FRAGMENT && (ip->ip_off & IP_DF) == 0)) {
  536                 /*
  537                  * Restore packet header fields to original values
  538                  */
  539                 ip->ip_len = htons(ip->ip_len);
  540                 ip->ip_off = htons(ip->ip_off);
  541                 /*
  542                  * Send off the packet via outgoing interface
  543                  */
  544                 error = (*ifp->if_output)(ifp, m,
  545                                 (struct sockaddr *)dst, ro.ro_rt);
  546         } else {
  547                 /*
  548                  * Handle EMSGSIZE with icmp reply needfrag for TCP MTU discovery
  549                  */
  550                 if (ip->ip_off & IP_DF) {
  551                         ipstat.ips_cantfrag++;
  552                         icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG,
  553                                 0, mtu);
  554                         goto consumed;
  555                 } else {
  556                         /*
  557                          * We have to fragment the packet
  558                          */
  559                         m->m_pkthdr.csum_flags |= CSUM_IP;
  560                         /*
  561                          * ip_fragment expects ip_len and ip_off in host byte
  562                          * order but returns all packets in network byte order
  563                          */
  564                         if (ip_fragment(ip, &m, mtu, ifp->if_hwassist,
  565                                         (~ifp->if_hwassist & CSUM_DELAY_IP))) {
  566                                 goto drop;
  567                         }
  568                         KASSERT(m != NULL, ("null mbuf and no error"));
  569                         /*
  570                          * Send off the fragments via outgoing interface
  571                          */
  572                         error = 0;
  573                         do {
  574                                 m0 = m->m_nextpkt;
  575                                 m->m_nextpkt = NULL;
  576 
  577                                 error = (*ifp->if_output)(ifp, m,
  578                                         (struct sockaddr *)dst, ro.ro_rt);
  579                                 if (error)
  580                                         break;
  581                         } while ((m = m0) != NULL);
  582                         if (error) {
  583                                 /* Reclaim remaining fragments */
  584                                 for (m = m0; m; m = m0) {
  585                                         m0 = m->m_nextpkt;
  586                                         m_freem(m);
  587                                 }
  588                         } else
  589                                 ipstat.ips_fragmented++;
  590                 }
  591         }
  592 
  593         if (error != 0)
  594                 ipstat.ips_odropped++;
  595         else {
  596                 ro.ro_rt->rt_rmx.rmx_pksent++;
  597                 ipstat.ips_forward++;
  598                 ipstat.ips_fastforward++;
  599         }
  600 consumed:
  601         RTFREE(ro.ro_rt);
  602         return 1;
  603 drop:
  604         if (m)
  605                 m_freem(m);
  606         if (ro.ro_rt)
  607                 RTFREE(ro.ro_rt);
  608         return 1;
  609 }

Cache object: 96d65a67123a86e34d0a1ef5462526d7


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.