Lines Matching refs:ixa

709 	ip_xmit_attr_t		*ixa;
715 * Get an exclusive ixa for this thread.
719 ixa = conn_get_ixa(connp, B_FALSE);
720 if (ixa == NULL)
724 ixa->ixa_flags |= IXAF_PMTU_DISCOVERY;
742 ixa->ixa_flags |= IXAF_IS_IPV4;
753 ixa->ixa_flags &= ~IXAF_IS_IPV4;
766 ixa->ixa_flags |= IXAF_IS_IPV4;
782 ip_attr_newdst(ixa);
794 ixa->ixa_flags |= IXAF_DONTFRAG | IXAF_PMTU_IPV4_DF;
797 error = ip_attr_connect(connp, ixa, &connp->conn_saddr_v6,
809 ixa->ixa_flags |= IXAF_VERIFY_PMTU;
831 oldixa = conn_replace_ixa(connp, ixa);
841 (void) iptun_update_mtu(iptun, ixa, 0);
847 ixa_refrele(ixa);
1261 /* Cache things in ixa without an extra refhold */
1732 iptun_get_dst_pmtu(iptun_t *iptun, ip_xmit_attr_t *ixa)
1745 if (ixa == NULL) {
1746 ixa = conn_get_ixa(connp, B_FALSE);
1747 if (ixa == NULL)
1755 if (ixa->ixa_ire != NULL) {
1756 pmtu = ip_get_pmtu(ixa);
1762 if (ixa->ixa_flags & IXAF_PMTU_TOO_SMALL) {
1764 ixa->ixa_flags &= ~IXAF_DONTFRAG;
1766 ixa->ixa_flags |= IXAF_DONTFRAG;
1769 ixa->ixa_flags &= ~IXAF_PMTU_IPV4_DF;
1774 ixa_refrele(ixa);
1783 iptun_update_dst_pmtu(iptun_t *iptun, ip_xmit_attr_t *ixa)
1793 if (ixa == NULL) {
1794 ixa = conn_get_ixa(connp, B_FALSE);
1795 if (ixa == NULL)
1803 if (ixa->ixa_ire != NULL) {
1804 pmtu = ip_get_pmtu(ixa);
1808 ixa->ixa_fragsize = ixa->ixa_pmtu = pmtu;
1814 if (ixa->ixa_flags & IXAF_PMTU_TOO_SMALL) {
1816 ixa->ixa_flags &= ~IXAF_DONTFRAG;
1818 ixa->ixa_flags |= IXAF_DONTFRAG;
1821 ixa->ixa_flags &= ~IXAF_PMTU_IPV4_DF;
1826 ixa_refrele(ixa);
1845 iptun_notify(void *arg, ip_xmit_attr_t *ixa, ixa_notify_type_t ntype,
1852 (void) iptun_update_mtu(iptun, ixa, narg);
1956 iptun_get_maxmtu(iptun_t *iptun, ip_xmit_attr_t *ixa, uint32_t new_pmtu)
1971 if ((pmtu = iptun_get_dst_pmtu(iptun, ixa)) == 0) {
2024 iptun_update_mtu(iptun_t *iptun, ip_xmit_attr_t *ixa, uint32_t new_pmtu)
2028 /* We always update the ixa since we might have set IXAF_VERIFY_PMTU */
2029 iptun_update_dst_pmtu(iptun, ixa);
2039 newmtu = iptun_get_maxmtu(iptun, ixa, new_pmtu);
2925 ipha_t *inner4, ip6_t *inner6, ip_xmit_attr_t *ixa)
2946 if (ixa->ixa_flags & IXAF_PMTU_IPV4_DF)
2961 ixa->ixa_flags &= ~IXAF_DONTFRAG;
2962 } else if (!(ixa->ixa_flags & IXAF_PMTU_TOO_SMALL) &&
2964 ixa->ixa_flags |= IXAF_DONTFRAG;
2967 ixa->ixa_ip_hdr_length = IPH_HDR_LENGTH(outer4);
2968 ixa->ixa_pktlen = msgdsize(mp);
2969 ixa->ixa_protocol = outer4->ipha_protocol;
2971 outer4->ipha_length = htons(ixa->ixa_pktlen);
3022 ipha_t *inner4, ip6_t *inner6, ip_xmit_attr_t *ixa)
3051 0, offset, ixa->ixa_tsl);
3079 ixa->ixa_ip_hdr_length = sizeof (iptun_ipv6hdrs_t);
3080 ixa->ixa_protocol = v6hdrs->it6h_encaplim.iel_destopt.ip6d_nxt;
3082 ixa->ixa_ip_hdr_length = sizeof (ip6_t);
3083 ixa->ixa_protocol = outer6->ip6_nxt;
3090 ixa->ixa_flags &= ~IXAF_DONTFRAG;
3091 else if (!(ixa->ixa_flags & IXAF_PMTU_TOO_SMALL))
3092 ixa->ixa_flags |= IXAF_DONTFRAG;
3094 ixa->ixa_pktlen = msgdsize(mp);
3095 outer6->ip6_plen = htons(ixa->ixa_pktlen - sizeof (ip6_t));
3110 ip_xmit_attr_t *ixa;
3133 ixa = conn_get_ixa_exclusive(connp);
3140 ixa = conn_get_ixa(connp, B_FALSE);
3142 if (ixa == NULL) {
3151 if (ixa->ixa_ire == NULL) {
3152 error = ip_attr_connect(connp, ixa, &connp->conn_saddr_v6,
3156 if (ixa->ixa_ire != NULL &&
3164 ixa_refrele(ixa);
3171 iptun_output_common(iptun, ixa, mp);
3172 ixa_refrele(ixa);
3176 * We use an ixa based on the last destination.
3184 ip_xmit_attr_t *ixa;
3206 ixa = conn_get_ixa_exclusive(connp);
3213 ixa = conn_get_ixa(connp, B_FALSE);
3215 if (ixa == NULL) {
3222 need_connect = (ixa->ixa_ire == NULL);
3225 ip_attr_newdst(ixa);
3239 * the ixa.
3245 error = ip_attr_connect(connp, ixa, &connp->conn_saddr_v6,
3248 if (ixa->ixa_ire != NULL &&
3256 ixa_refrele(ixa);
3263 iptun_output_common(iptun, ixa, mp);
3270 oldixa = conn_replace_ixa(connp, ixa);
3275 ixa_refrele(ixa);
3288 iptun_output_check_label(mblk_t **mpp, ip_xmit_attr_t *ixa)
3306 ip_xmit_attr_restore_tsl(ixa, cr);
3312 if (ixa->ixa_flags & IXAF_IS_IPV4) {
3317 err = tsol_check_label_v4(ixa->ixa_tsl,
3318 ixa->ixa_zoneid, mpp, CONN_MAC_DEFAULT, B_FALSE,
3319 ixa->ixa_ipst, &effective_tsl);
3331 err = tsol_check_label_v6(ixa->ixa_tsl,
3332 ixa->ixa_zoneid, mpp, CONN_MAC_DEFAULT, B_FALSE,
3333 ixa->ixa_ipst, &effective_tsl);
3343 ip_xmit_attr_replace_tsl(ixa, effective_tsl);
3345 ixa->ixa_pktlen += adjust;
3346 ixa->ixa_ip_hdr_length += adjust;
3352 iptun_output_common(iptun_t *iptun, ip_xmit_attr_t *ixa, mblk_t *mp)
3362 ASSERT(ixa->ixa_ire != NULL);
3372 iaflags_t dontfrag = ixa->ixa_flags & IXAF_DONTFRAG;
3377 ixa);
3380 ixa);
3391 outer6, outer_hlen, ixa);
3402 error = iptun_output_check_label(&mp, ixa);
3420 * Otherwise, we're good to go. The ixa has been updated with
3427 atomic_add_64(&iptun->iptun_obytes, ixa->ixa_pktlen);
3441 ixa->ixa_pktlen = msgdsize(newmp);
3442 if (ixa->ixa_pktlen <= minmtu)
3443 ixa->ixa_flags &= ~IXAF_DONTFRAG;
3447 atomic_add_64(&iptun->iptun_obytes, ixa->ixa_pktlen);
3449 error = conn_ip_output(newmp, ixa);
3452 ixa->ixa_flags |= dontfrag;
3456 (void) iptun_update_mtu(iptun, ixa, 0);
3465 ASSERT(ixa->ixa_ipsec_policy == NULL);
3466 mp = ip_output_attach_policy(mp, outer4, outer6, NULL, ixa);
3477 error = iptun_output_check_label(&mp, ixa);
3486 atomic_add_64(&iptun->iptun_obytes, ixa->ixa_pktlen);
3488 error = conn_ip_output(mp, ixa);
3491 (void) iptun_update_mtu(iptun, ixa, 0);
3494 if (ixa->ixa_flags & IXAF_IPSEC_SECURE)
3495 ipsec_out_release_refs(ixa);