Deleted Added
full compact
ip6_output.c (242079) ip6_output.c (242463)
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
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

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

56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 * SUCH DAMAGE.
59 *
60 * @(#)ip_output.c 8.3 (Berkeley) 1/21/94
61 */
62
63#include <sys/cdefs.h>
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
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

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

56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 * SUCH DAMAGE.
59 *
60 * @(#)ip_output.c 8.3 (Berkeley) 1/21/94
61 */
62
63#include <sys/cdefs.h>
64__FBSDID("$FreeBSD: head/sys/netinet6/ip6_output.c 242079 2012-10-25 09:39:14Z ae $");
64__FBSDID("$FreeBSD: head/sys/netinet6/ip6_output.c 242463 2012-11-02 01:20:55Z ae $");
65
66#include "opt_inet.h"
67#include "opt_inet6.h"
68#include "opt_ipfw.h"
69#include "opt_ipsec.h"
70#include "opt_sctp.h"
71#include "opt_route.h"
72

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

908 m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
909#endif
910 error = netisr_queue(NETISR_IPV6, m);
911 goto done;
912 } else
913 goto again; /* Redo the routing table lookup. */
914 }
915
65
66#include "opt_inet.h"
67#include "opt_inet6.h"
68#include "opt_ipfw.h"
69#include "opt_ipsec.h"
70#include "opt_sctp.h"
71#include "opt_route.h"
72

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

908 m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
909#endif
910 error = netisr_queue(NETISR_IPV6, m);
911 goto done;
912 } else
913 goto again; /* Redo the routing table lookup. */
914 }
915
916 if (V_pfilforward == 0)
917 goto passout;
918 /* See if local, if yes, send it to netisr. */
919 if (m->m_flags & M_FASTFWD_OURS) {
920 if (m->m_pkthdr.rcvif == NULL)
921 m->m_pkthdr.rcvif = V_loif;
922 if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) {
923 m->m_pkthdr.csum_flags |=
924 CSUM_DATA_VALID_IPV6 | CSUM_PSEUDO_HDR;
925 m->m_pkthdr.csum_data = 0xffff;
926 }
927#ifdef SCTP
928 if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6)
929 m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
930#endif
931 error = netisr_queue(NETISR_IPV6, m);
932 goto done;
933 }
934 /* Or forward to some other address? */
916 /* See if local, if yes, send it to netisr. */
917 if (m->m_flags & M_FASTFWD_OURS) {
918 if (m->m_pkthdr.rcvif == NULL)
919 m->m_pkthdr.rcvif = V_loif;
920 if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) {
921 m->m_pkthdr.csum_flags |=
922 CSUM_DATA_VALID_IPV6 | CSUM_PSEUDO_HDR;
923 m->m_pkthdr.csum_data = 0xffff;
924 }
925#ifdef SCTP
926 if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6)
927 m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
928#endif
929 error = netisr_queue(NETISR_IPV6, m);
930 goto done;
931 }
932 /* Or forward to some other address? */
935 fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL);
936 if (fwd_tag) {
933 if ((m->m_flags & M_IP6_NEXTHOP) &&
934 (fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL)) != NULL) {
937 dst = (struct sockaddr_in6 *)&ro->ro_dst;
938 bcopy((fwd_tag+1), dst, sizeof(struct sockaddr_in6));
939 m->m_flags |= M_SKIP_FIREWALL;
935 dst = (struct sockaddr_in6 *)&ro->ro_dst;
936 bcopy((fwd_tag+1), dst, sizeof(struct sockaddr_in6));
937 m->m_flags |= M_SKIP_FIREWALL;
938 m->m_flags &= ~M_IP6_NEXTHOP;
940 m_tag_delete(m, fwd_tag);
941 goto again;
942 }
943
944passout:
945 /*
946 * Send the packet to the outgoing interface.
947 * If necessary, do IPv6 fragmentation before sending.

--- 2146 unchanged lines hidden ---
939 m_tag_delete(m, fwd_tag);
940 goto again;
941 }
942
943passout:
944 /*
945 * Send the packet to the outgoing interface.
946 * If necessary, do IPv6 fragmentation before sending.

--- 2146 unchanged lines hidden ---