ip_fastfwd.c (148324) | ip_fastfwd.c (148887) |
---|---|
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 --- 12 unchanged lines hidden (view full) --- 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 * | 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 --- 12 unchanged lines hidden (view full) --- 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: head/sys/netinet/ip_fastfwd.c 148324 2005-07-23 00:59:13Z keramida $ | 29 * $FreeBSD: head/sys/netinet/ip_fastfwd.c 148887 2005-08-09 10:20:02Z rwatson $ |
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 --- 86 unchanged lines hidden (view full) --- 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) && | 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 --- 86 unchanged lines hidden (view full) --- 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_flags & IFF_RUNNING)) { | 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); --- 482 unchanged lines hidden --- | 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); --- 482 unchanged lines hidden --- |