sctp6_usrreq.c (283822) | sctp6_usrreq.c (284633) |
---|---|
1/*- 2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. 3 * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. 4 * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are met: 8 * --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. 3 * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. 4 * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are met: 8 * --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: stable/10/sys/netinet6/sctp6_usrreq.c 283822 2015-05-31 12:46:40Z tuexen $"); | 34__FBSDID("$FreeBSD: stable/10/sys/netinet6/sctp6_usrreq.c 284633 2015-06-20 08:25:27Z tuexen $"); |
35 36#include <netinet/sctp_os.h> 37#ifdef INET6 38#include <sys/proc.h> 39#include <netinet/sctp_pcb.h> 40#include <netinet/sctp_header.h> 41#include <netinet/sctp_var.h> 42#ifdef INET6 --- 36 unchanged lines hidden (view full) --- 79 int length, offset; 80 81#if !defined(SCTP_WITH_NO_CSUM) 82 uint8_t compute_crc; 83 84#endif 85 uint32_t mflowid; 86 uint8_t mflowtype; | 35 36#include <netinet/sctp_os.h> 37#ifdef INET6 38#include <sys/proc.h> 39#include <netinet/sctp_pcb.h> 40#include <netinet/sctp_header.h> 41#include <netinet/sctp_var.h> 42#ifdef INET6 --- 36 unchanged lines hidden (view full) --- 79 int length, offset; 80 81#if !defined(SCTP_WITH_NO_CSUM) 82 uint8_t compute_crc; 83 84#endif 85 uint32_t mflowid; 86 uint8_t mflowtype; |
87 uint16_t fibnum; |
|
87 88 iphlen = *offp; 89 if (SCTP_GET_PKT_VRFID(*i_pak, vrf_id)) { 90 SCTP_RELEASE_PKT(*i_pak); 91 return (IPPROTO_DONE); 92 } 93 m = SCTP_HEADER_TO_CHAIN(*i_pak); 94#ifdef SCTP_MBUF_LOGGING --- 9 unchanged lines hidden (view full) --- 104#endif 105 SCTPDBG(SCTP_DEBUG_CRCOFFLOAD, 106 "sctp6_input(): Packet of length %d received on %s with csum_flags 0x%b.\n", 107 m->m_pkthdr.len, 108 if_name(m->m_pkthdr.rcvif), 109 (int)m->m_pkthdr.csum_flags, CSUM_BITS); 110 mflowid = m->m_pkthdr.flowid; 111 mflowtype = M_HASHTYPE_GET(m); | 88 89 iphlen = *offp; 90 if (SCTP_GET_PKT_VRFID(*i_pak, vrf_id)) { 91 SCTP_RELEASE_PKT(*i_pak); 92 return (IPPROTO_DONE); 93 } 94 m = SCTP_HEADER_TO_CHAIN(*i_pak); 95#ifdef SCTP_MBUF_LOGGING --- 9 unchanged lines hidden (view full) --- 105#endif 106 SCTPDBG(SCTP_DEBUG_CRCOFFLOAD, 107 "sctp6_input(): Packet of length %d received on %s with csum_flags 0x%b.\n", 108 m->m_pkthdr.len, 109 if_name(m->m_pkthdr.rcvif), 110 (int)m->m_pkthdr.csum_flags, CSUM_BITS); 111 mflowid = m->m_pkthdr.flowid; 112 mflowtype = M_HASHTYPE_GET(m); |
113 fibnum = M_GETFIB(m); |
|
112 SCTP_STAT_INCR(sctps_recvpackets); 113 SCTP_STAT_INCR_COUNTER64(sctps_inpackets); 114 /* Get IP, SCTP, and first chunk header together in the first mbuf. */ 115 offset = iphlen + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); 116 ip6 = mtod(m, struct ip6_hdr *); 117 IP6_EXTHDR_GET(sh, struct sctphdr *, m, iphlen, 118 (int)(sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr))); 119 if (sh == NULL) { --- 48 unchanged lines hidden (view full) --- 168 sctp_common_input_processing(&m, iphlen, offset, length, 169 (struct sockaddr *)&src, 170 (struct sockaddr *)&dst, 171 sh, ch, 172#if !defined(SCTP_WITH_NO_CSUM) 173 compute_crc, 174#endif 175 ecn_bits, | 114 SCTP_STAT_INCR(sctps_recvpackets); 115 SCTP_STAT_INCR_COUNTER64(sctps_inpackets); 116 /* Get IP, SCTP, and first chunk header together in the first mbuf. */ 117 offset = iphlen + sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr); 118 ip6 = mtod(m, struct ip6_hdr *); 119 IP6_EXTHDR_GET(sh, struct sctphdr *, m, iphlen, 120 (int)(sizeof(struct sctphdr) + sizeof(struct sctp_chunkhdr))); 121 if (sh == NULL) { --- 48 unchanged lines hidden (view full) --- 170 sctp_common_input_processing(&m, iphlen, offset, length, 171 (struct sockaddr *)&src, 172 (struct sockaddr *)&dst, 173 sh, ch, 174#if !defined(SCTP_WITH_NO_CSUM) 175 compute_crc, 176#endif 177 ecn_bits, |
176 mflowtype, mflowid, | 178 mflowtype, mflowid, fibnum, |
177 vrf_id, port); 178out: 179 if (m) { 180 sctp_m_freem(m); 181 } 182 return (IPPROTO_DONE); 183} 184 --- 1047 unchanged lines hidden --- | 179 vrf_id, port); 180out: 181 if (m) { 182 sctp_m_freem(m); 183 } 184 return (IPPROTO_DONE); 185} 186 --- 1047 unchanged lines hidden --- |