Patrick McHardy wrote: > int xfrm_state_mtu(struct xfrm_state *x, int mtu) > { > - int res = mtu; > - > - res -= x->props.header_len; > - > - for (;;) { > - int m = res; > - > - if (m < 68) > - return 68; > - > - spin_lock_bh(&x->lock); > - if (x->km.state == XFRM_STATE_VALID && > - x->type && x->type->get_max_size) > - m = x->type->get_max_size(x, m); > - else > - m += x->props.header_len; > - spin_unlock_bh(&x->lock); > - > - if (m <= mtu) > - break; > - res -= (m - mtu); > - } > + int res; > > + spin_lock_bh(&x->lock); > + if (x->km.state == XFRM_STATE_VALID && > + x->type && x->type->get_mtu) > + res = x->type->get_mtu(x, mtu); > + else > + res = mtu; > + spin_unlock_bh(&x->lock); > return res; > } That broke estimation for AH. This one should be fine.