<p></p>
<p dir="auto">Thank you. I am trying to summarize it</p>
<ol dir="auto">
<li>core option pmtu_discovery for IPv4</li>
</ol>
<ul dir="auto">
<li>exists a long time</li>
<li>sets socket option IP_PMTUDISC_DO</li>
<li>sets do not fragment bit in outgoing packets</li>
<li>kernel will implement PMTU discovery, initial UDP packets might be dropped while the kernel tries to figure out the MTU</li>
<li>if MTU is found, UDP will be delivered and kernel will store the discovered MTU internally</li>
<li>further packets will use this value</li>
<li>this is probably not really efficient, but probably works</li>
</ul>
<ol start="2" dir="auto">
<li>core option pmtu_discovery for IPv6</li>
</ol>
<ul dir="auto">
<li>new introduced in this PR</li>
<li>set socket option IP_PMTUDISC_DO</li>
<li>will not set do not fragment bit in outgoing packets</li>
<li>the kernel will refuse larger packets with EMSGSIZE</li>
<li>no discovery will take place, Kamailio will probably just stop sending the packet</li>
</ul>
<ol start="3" dir="auto">
<li>suggestion in this PR for IPv6</li>
</ol>
<ul dir="auto">
<li>use IPV6_PMTUDISC_WANT as socket option</li>
<li>will fragment a datagram if needed according to the path MTU for IPv6</li>
<li>probably could be set by adding a new core option</li>
</ul>
<ol start="4" dir="auto">
<li>suggestion in this PR for IPv4</li>
</ol>
<ul dir="auto">
<li>use IP_PMTUDISC_WANT as socket option</li>
<li>will fragment a datagram if needed according to the path MTU, or will set the don't-fragment flag otherwise</li>
<li>probably could be set by adding a new core option</li>
</ul>
<ol start="5" dir="auto">
<li>Additionally Kamailio provide options to manually manage the MTU with usual sockets</li>
</ol>
<ul dir="auto">
<li>core setting udp_mtu and udp_mtu_try_proto</li>
<li>will try another protocol if MTU exceeded internally</li>
</ul>
<ol start="6" dir="auto">
<li>Additionally Kamailio provide options to manually manage the MTU with RAW sockets</li>
</ol>
<ul dir="auto">
<li>core option udp4_raw_mtu</li>
<li>will fragment the packets internally</li>
</ul>
<p dir="auto">My suggestion would be add a new value <strong>2</strong> to the pmtu_discovery core parameter, which sets then the _WANT socket option for IPv4 and IPv6.</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-1219552551">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPZOLC364FZKMS4PM3VZZA6FANCNFSM5YP6JGMA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZPW6HBFBBECSYXH72TVZZA6FA5CNFSM5YP6JGMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOJCYOKJY.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/c1219552551</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-1219552551",
"url": "https://github.com/kamailio/kamailio/pull/3141#issuecomment-1219552551",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>