Deleted Added
full compact
ip_fastfwd.c (122797) ip_fastfwd.c (122921)
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 122797 2003-11-16 12:50:33Z andre $
29 * $FreeBSD: head/sys/netinet/ip_fastfwd.c 122921 2003-11-20 19:47:31Z andre $
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

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

483 /*
484 * Find route to destination.
485 */
486 bzero(&ro, sizeof(ro));
487 dst = (struct sockaddr_in *)&ro.ro_dst;
488 dst->sin_family = AF_INET;
489 dst->sin_len = sizeof(*dst);
490 dst->sin_addr.s_addr = dest;
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

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

483 /*
484 * Find route to destination.
485 */
486 bzero(&ro, sizeof(ro));
487 dst = (struct sockaddr_in *)&ro.ro_dst;
488 dst->sin_family = AF_INET;
489 dst->sin_len = sizeof(*dst);
490 dst->sin_addr.s_addr = dest;
491 rtalloc_ign(&ro, (RTF_PRCLONING | RTF_CLONING));
491 rtalloc_ign(&ro, RTF_CLONING);
492
493 /*
494 * Route there and interface still up?
495 */
496 if (ro.ro_rt &&
497 (ro.ro_rt->rt_flags & RTF_UP) &&
498 (ro.ro_rt->rt_ifp->if_flags & IFF_UP)) {
499 ia = ifatoia(ro.ro_rt->rt_ifa);

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

687 * Redo route lookup with new destination address
688 */
689 RTFREE(ro.ro_rt);
690 bzero(&ro, sizeof(ro));
691 dst = (struct sockaddr_in *)&ro.ro_dst;
692 dst->sin_family = AF_INET;
693 dst->sin_len = sizeof(*dst);
694 dst->sin_addr.s_addr = dest;
492
493 /*
494 * Route there and interface still up?
495 */
496 if (ro.ro_rt &&
497 (ro.ro_rt->rt_flags & RTF_UP) &&
498 (ro.ro_rt->rt_ifp->if_flags & IFF_UP)) {
499 ia = ifatoia(ro.ro_rt->rt_ifa);

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

687 * Redo route lookup with new destination address
688 */
689 RTFREE(ro.ro_rt);
690 bzero(&ro, sizeof(ro));
691 dst = (struct sockaddr_in *)&ro.ro_dst;
692 dst->sin_family = AF_INET;
693 dst->sin_len = sizeof(*dst);
694 dst->sin_addr.s_addr = dest;
695 rtalloc_ign(&ro, (RTF_PRCLONING | RTF_CLONING));
695 rtalloc_ign(&ro, RTF_CLONING);
696
697 /*
698 * Route there and interface still up?
699 */
700 if (ro.ro_rt &&
701 (ro.ro_rt->rt_flags & RTF_UP) &&
702 (ro.ro_rt->rt_ifp->if_flags & IFF_UP)) {
703 ia = ifatoia(ro.ro_rt->rt_ifa);

--- 103 unchanged lines hidden ---
696
697 /*
698 * Route there and interface still up?
699 */
700 if (ro.ro_rt &&
701 (ro.ro_rt->rt_flags & RTF_UP) &&
702 (ro.ro_rt->rt_ifp->if_flags & IFF_UP)) {
703 ia = ifatoia(ro.ro_rt->rt_ifa);

--- 103 unchanged lines hidden ---