user11009: In ten Noble path the sequence is right knowledge and right release. (Samma Nana and samma vimutti)
In SN 12.23 it says:
Dispassion is a vital condition for freedom.
virāgūpanisā vimutti,
Freedom is a vital condition for the knowledge of ending.
vimuttūpanisaṃ khayeñāṇaṃ.
https://suttacentral.net/sn12.23/en/sujato

user8157: SN 12.23 says: 

Khayeñāṇaṃ (knowledge of destruction of defilements) has freedom (from defilements) as its condition. 
Freedom (from defilements) has dispassion, disillusionment & yathābhūtañāṇadassanan (truly knowing and seeing) as its conditions. 

Therefore, if following the sequence of dhammas in SN 12.23, "right knowledge" ("samma ñāṇa") in MN 117 would be yathābhūtañāṇadassanan and not khayeñāṇaṃ. 

11009: <p>In ten Noble path the sequence is right knowledge and right release. (Samma Nana and samma vimutti)</p>

<p>In SN 12.23 it says:</p>

<p>Dispassion is a vital condition for freedom.</p>

<p>virāgūpanisā vimutti,</p>

<p>Freedom is a vital condition for the knowledge of ending.</p>

<p>vimuttūpanisaṃ khayeñāṇaṃ.</p>

<p><a href="https://suttacentral.net/sn12.23/en/sujato" rel="nofollow noreferrer">https://suttacentral.net/sn12.23/en/sujato</a></p>
 8157: <p>SN 12.23 says: </p>

<ul>
<li><p>Khaye<strong>ñāṇa</strong>ṃ (knowledge of destruction of defilements) has freedom (from defilements) as its condition. </p></li>
<li><p>Freedom (from defilements) has dispassion, disillusionment &amp; yathābhūta<strong>ñāṇa</strong>dassanan (truly knowing and seeing) as its conditions. </p></li>
</ul>

<p>Therefore, if following the sequence of dhammas in SN 12.23, "right knowledge" ("samma ñāṇa") in MN 117 would be yathābhūta<strong>ñāṇa</strong>dassanan and not khaye<strong>ñāṇa</strong>ṃ. </p>
