<p></p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sergey-safarov/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sergey-safarov">@sergey-safarov</a> You did not say how it "did not work as expected".</p>
<p dir="auto">With what I've learnt, I was a bit surprised about the IPv4 original code, which says</p>
<pre class="notranslate"><code class="notranslate">optval= (pmtu_discovery) ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
</code></pre>
<p dir="auto">WIth <code class="notranslate">ptmu_discover != 0</code> this code sets the DF flag on all IPv4 traffic, and makes it behave like in IPv6 where this is implied.  But I am not so sure if it picks up any ICMP messages <em>Fragmentation needed and DF set</em> are processed.  An unconnected socket has no way of using that.</p>
<p dir="auto">Had it been <code class="notranslate">IP_PMTUDISC_WANT</code>, like I used for IPv6, then at least any such messages would have been learnt by the OS for the route and influence the resend.</p>
<p dir="auto">I did not want to change the existing code, but given that you do not experience a benefit, this might make sense.  It is much less clear than in the case for IPv6, though, so I am uncertain.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/3141#issuecomment-1153240930">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZLFAK7MK2VLOA6QFPTVOYNBNANCNFSM5YP6JGMA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZPKSNWVNDMN3FF6OQ3VOYNBNA5CNFSM5YP6JGMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIS6Q6YQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/pull/3141/c1153240930</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/3141#issuecomment-1153240930",
"url": "https://github.com/kamailio/kamailio/pull/3141#issuecomment-1153240930",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>