Lines Matching defs:ixa
708 ip_xmit_attr_t *ixa;
714 * Get an exclusive ixa for this thread.
718 ixa = conn_get_ixa(connp, B_FALSE);
719 if (ixa == NULL)
723 ixa->ixa_flags |= IXAF_PMTU_DISCOVERY;
741 ixa->ixa_flags |= IXAF_IS_IPV4;
752 ixa->ixa_flags &= ~IXAF_IS_IPV4;
765 ixa->ixa_flags |= IXAF_IS_IPV4;
781 ip_attr_newdst(ixa);
793 ixa->ixa_flags |= IXAF_DONTFRAG | IXAF_PMTU_IPV4_DF;
796 error = ip_attr_connect(connp, ixa, &connp->conn_saddr_v6,
808 ixa->ixa_flags |= IXAF_VERIFY_PMTU;
830 oldixa = conn_replace_ixa(connp, ixa);
840 (void) iptun_update_mtu(iptun, ixa, 0);
846 ixa_refrele(ixa);
1260 /* Cache things in ixa without an extra refhold */
1730 iptun_get_dst_pmtu(iptun_t *iptun, ip_xmit_attr_t *ixa)
1743 if (ixa == NULL) {
1744 ixa = conn_get_ixa(connp, B_FALSE);
1745 if (ixa == NULL)
1753 if (ixa->ixa_ire != NULL) {
1754 pmtu = ip_get_pmtu(ixa);
1760 if (ixa->ixa_flags & IXAF_PMTU_TOO_SMALL) {
1762 ixa->ixa_flags &= ~IXAF_DONTFRAG;
1764 ixa->ixa_flags |= IXAF_DONTFRAG;
1767 ixa->ixa_flags &= ~IXAF_PMTU_IPV4_DF;
1772 ixa_refrele(ixa);
1781 iptun_update_dst_pmtu(iptun_t *iptun, ip_xmit_attr_t *ixa)
1791 if (ixa == NULL) {
1792 ixa = conn_get_ixa(connp, B_FALSE);
1793 if (ixa == NULL)
1801 if (ixa->ixa_ire != NULL) {
1802 pmtu = ip_get_pmtu(ixa);
1806 ixa->ixa_fragsize = ixa->ixa_pmtu = pmtu;
1812 if (ixa->ixa_flags & IXAF_PMTU_TOO_SMALL) {
1814 ixa->ixa_flags &= ~IXAF_DONTFRAG;
1816 ixa->ixa_flags |= IXAF_DONTFRAG;
1819 ixa->ixa_flags &= ~IXAF_PMTU_IPV4_DF;
1824 ixa_refrele(ixa);
1843 iptun_notify(void *arg, ip_xmit_attr_t *ixa, ixa_notify_type_t ntype,
1850 (void) iptun_update_mtu(iptun, ixa, narg);
1954 iptun_get_maxmtu(iptun_t *iptun, ip_xmit_attr_t *ixa, uint32_t new_pmtu)
1969 if ((pmtu = iptun_get_dst_pmtu(iptun, ixa)) == 0) {
2022 iptun_update_mtu(iptun_t *iptun, ip_xmit_attr_t *ixa, uint32_t new_pmtu)
2026 /* We always update the ixa since we might have set IXAF_VERIFY_PMTU */
2027 iptun_update_dst_pmtu(iptun, ixa);
2037 newmtu = iptun_get_maxmtu(iptun, ixa, new_pmtu);
2923 ipha_t *inner4, ip6_t *inner6, ip_xmit_attr_t *ixa)
2944 if (ixa->ixa_flags & IXAF_PMTU_IPV4_DF)
2959 ixa->ixa_flags &= ~IXAF_DONTFRAG;
2960 } else if (!(ixa->ixa_flags & IXAF_PMTU_TOO_SMALL) &&
2962 ixa->ixa_flags |= IXAF_DONTFRAG;
2965 ixa->ixa_ip_hdr_length = IPH_HDR_LENGTH(outer4);
2966 ixa->ixa_pktlen = msgdsize(mp);
2967 ixa->ixa_protocol = outer4->ipha_protocol;
2969 outer4->ipha_length = htons(ixa->ixa_pktlen);
3020 ipha_t *inner4, ip6_t *inner6, ip_xmit_attr_t *ixa)
3049 0, offset, ixa->ixa_tsl);
3077 ixa->ixa_ip_hdr_length = sizeof (iptun_ipv6hdrs_t);
3078 ixa->ixa_protocol = v6hdrs->it6h_encaplim.iel_destopt.ip6d_nxt;
3080 ixa->ixa_ip_hdr_length = sizeof (ip6_t);
3081 ixa->ixa_protocol = outer6->ip6_nxt;
3088 ixa->ixa_flags &= ~IXAF_DONTFRAG;
3089 else if (!(ixa->ixa_flags & IXAF_PMTU_TOO_SMALL))
3090 ixa->ixa_flags |= IXAF_DONTFRAG;
3092 ixa->ixa_pktlen = msgdsize(mp);
3093 outer6->ip6_plen = htons(ixa->ixa_pktlen - sizeof (ip6_t));
3108 ip_xmit_attr_t *ixa;
3131 ixa = conn_get_ixa_exclusive(connp);
3138 ixa = conn_get_ixa(connp, B_FALSE);
3140 if (ixa == NULL) {
3149 if (ixa->ixa_ire == NULL) {
3150 error = ip_attr_connect(connp, ixa, &connp->conn_saddr_v6,
3154 if (ixa->ixa_ire != NULL &&
3162 ixa_refrele(ixa);
3169 iptun_output_common(iptun, ixa, mp);
3170 ixa_refrele(ixa);
3174 * We use an ixa based on the last destination.
3182 ip_xmit_attr_t *ixa;
3204 ixa = conn_get_ixa_exclusive(connp);
3211 ixa = conn_get_ixa(connp, B_FALSE);
3213 if (ixa == NULL) {
3220 need_connect = (ixa->ixa_ire == NULL);
3223 ip_attr_newdst(ixa);
3237 * the ixa.
3243 error = ip_attr_connect(connp, ixa, &connp->conn_saddr_v6,
3246 if (ixa->ixa_ire != NULL &&
3254 ixa_refrele(ixa);
3261 iptun_output_common(iptun, ixa, mp);
3268 oldixa = conn_replace_ixa(connp, ixa);
3273 ixa_refrele(ixa);
3286 iptun_output_check_label(mblk_t **mpp, ip_xmit_attr_t *ixa)
3304 ip_xmit_attr_restore_tsl(ixa, cr);
3310 if (ixa->ixa_flags & IXAF_IS_IPV4) {
3315 err = tsol_check_label_v4(ixa->ixa_tsl,
3316 ixa->ixa_zoneid, mpp, CONN_MAC_DEFAULT, B_FALSE,
3317 ixa->ixa_ipst, &effective_tsl);
3329 err = tsol_check_label_v6(ixa->ixa_tsl,
3330 ixa->ixa_zoneid, mpp, CONN_MAC_DEFAULT, B_FALSE,
3331 ixa->ixa_ipst, &effective_tsl);
3341 ip_xmit_attr_replace_tsl(ixa, effective_tsl);
3343 ixa->ixa_pktlen += adjust;
3344 ixa->ixa_ip_hdr_length += adjust;
3350 iptun_output_common(iptun_t *iptun, ip_xmit_attr_t *ixa, mblk_t *mp)
3360 ASSERT(ixa->ixa_ire != NULL);
3370 iaflags_t dontfrag = ixa->ixa_flags & IXAF_DONTFRAG;
3375 ixa);
3378 ixa);
3389 outer6, outer_hlen, ixa);
3400 error = iptun_output_check_label(&mp, ixa);
3418 * Otherwise, we're good to go. The ixa has been updated with
3425 atomic_add_64(&iptun->iptun_obytes, ixa->ixa_pktlen);
3439 ixa->ixa_pktlen = msgdsize(newmp);
3440 if (ixa->ixa_pktlen <= minmtu)
3441 ixa->ixa_flags &= ~IXAF_DONTFRAG;
3445 atomic_add_64(&iptun->iptun_obytes, ixa->ixa_pktlen);
3447 error = conn_ip_output(newmp, ixa);
3450 ixa->ixa_flags |= dontfrag;
3454 (void) iptun_update_mtu(iptun, ixa, 0);
3463 ASSERT(ixa->ixa_ipsec_policy == NULL);
3464 mp = ip_output_attach_policy(mp, outer4, outer6, NULL, ixa);
3475 error = iptun_output_check_label(&mp, ixa);
3484 atomic_add_64(&iptun->iptun_obytes, ixa->ixa_pktlen);
3486 error = conn_ip_output(mp, ixa);
3489 (void) iptun_update_mtu(iptun, ixa, 0);
3492 if (ixa->ixa_flags & IXAF_IPSEC_SECURE)
3493 ipsec_out_release_refs(ixa);