2004
2005 /*
2006 * We repeat this as we parse over destination options header and
2007 * fragment headers (earlier we've handled any hop-by-hop options
2008 * header.)
2009 * We update ira_protocol and ira_ip_hdr_length as we skip past
2010 * the intermediate headers; they already point past any
2011 * hop-by-hop header.
2012 */
2013 repeat:
2014 protocol = ira->ira_protocol;
2015 ip_hdr_length = ira->ira_ip_hdr_length;
2016
2017 /*
2018 * Time for IPP once we've done reassembly and IPsec.
2019 * We skip this for loopback packets since we don't do IPQoS
2020 * on loopback.
2021 */
2022 if (IPP_ENABLED(IPP_LOCAL_IN, ipst) &&
2023 !(iraflags & IRAF_LOOPBACK) &&
2024 (protocol != IPPROTO_ESP || protocol != IPPROTO_AH ||
2025 protocol != IPPROTO_DSTOPTS || protocol != IPPROTO_ROUTING ||
2026 protocol != IPPROTO_FRAGMENT)) {
2027 /*
2028 * Use the interface on which the packet arrived - not where
2029 * the IP address is hosted.
2030 */
2031 /* ip_process translates an IS_UNDER_IPMP */
2032 mp = ip_process(IPP_LOCAL_IN, mp, rill, ill);
2033 if (mp == NULL) {
2034 /* ip_drop_packet and MIB done */
2035 return;
2036 }
2037 }
2038
2039 /* Determine the minimum required size of the upper-layer header */
2040 /* Need to do this for at least the set of ULPs that TX handles. */
2041 switch (protocol) {
2042 case IPPROTO_TCP:
2043 min_ulp_header_length = TCP_MIN_HEADER_LENGTH;
2044 break;
2045 case IPPROTO_SCTP:
|
2004
2005 /*
2006 * We repeat this as we parse over destination options header and
2007 * fragment headers (earlier we've handled any hop-by-hop options
2008 * header.)
2009 * We update ira_protocol and ira_ip_hdr_length as we skip past
2010 * the intermediate headers; they already point past any
2011 * hop-by-hop header.
2012 */
2013 repeat:
2014 protocol = ira->ira_protocol;
2015 ip_hdr_length = ira->ira_ip_hdr_length;
2016
2017 /*
2018 * Time for IPP once we've done reassembly and IPsec.
2019 * We skip this for loopback packets since we don't do IPQoS
2020 * on loopback.
2021 */
2022 if (IPP_ENABLED(IPP_LOCAL_IN, ipst) &&
2023 !(iraflags & IRAF_LOOPBACK) &&
2024 (protocol != IPPROTO_ESP && protocol != IPPROTO_AH &&
2025 protocol != IPPROTO_DSTOPTS && protocol != IPPROTO_ROUTING &&
2026 protocol != IPPROTO_FRAGMENT)) {
2027 /*
2028 * Use the interface on which the packet arrived - not where
2029 * the IP address is hosted.
2030 */
2031 /* ip_process translates an IS_UNDER_IPMP */
2032 mp = ip_process(IPP_LOCAL_IN, mp, rill, ill);
2033 if (mp == NULL) {
2034 /* ip_drop_packet and MIB done */
2035 return;
2036 }
2037 }
2038
2039 /* Determine the minimum required size of the upper-layer header */
2040 /* Need to do this for at least the set of ULPs that TX handles. */
2041 switch (protocol) {
2042 case IPPROTO_TCP:
2043 min_ulp_header_length = TCP_MIN_HEADER_LENGTH;
2044 break;
2045 case IPPROTO_SCTP:
|