Pre-Submission Checklist

Type Of Change

Checklist:

Description

The IPv6 support for Path MTU discovery is absent, but IPv6 has no DF flag to allow downstream fragmentation. See Issue #3119 for my discovery / learning path. In short, unconnected UDP sockets do not learn Path MTU problems, so a message dropped once will be dropped again on resend. Using IPV6_PMTUDISC_WANT, any knowledge in the kernel can be used to fragment the message at sending time, as intended for IPv6.

These patches actually correct two IPv6-related things in the core/udp_server.c,

  1. Benefit from any kernel knowledge about Path MTU for IPv6
  2. The same option to learn from UDP_ERRORS is now available for IPv6

Do note that the last has not been implemented for IPv4 or IPv6. It is more useful for IPv6, allowing instant "tm" resends for Path MTU, but not "sl" I think. I cannot do that work, but this brings IPv6 to the same level as IPv4.

commit 0f90cff05c1a448eb2f85f83b4c087ab32ede11
Author: Rick van Rein <rick@openfortress.nl>
Date:   Sat Jun 11 10:57:32 2022 +0000

    core: Issue 3119.  Handling ICMPv6 Packet too Big
    
    - This was only defined for IPv4 under flag UDP_ERRORS
    - IPv6 has no toggle DF to clear for en-route fragmentation
    - Kamailio currently does not collect with recvmsg(...,MSG_ERRQUEUE)
    - The benefits of adding that can be instant resends for "tm" messages
    - Note that "sl" messages will have been forgotten at this point

commit 6b404b5f9807174177bee36eaf3543be0794f55e
Author: Rick van Rein <rick@openfortress.nl>
Date:   Sat Jun 11 10:44:27 2022 +0000

    core: Issue #3119.  Path MTU kernel info for IPv6
    
    - For IPv4, DF is an option; for IPv6 it is always active
    - This makes pmtu_discover an IPv4-only option
    - This means that we should set IPV6_MTU_DISCOVER to IPV6_PMTUDISC_WANT
    - Unconnected UDP sockets can now learn from ICMPv6 "Packet too Big"
    - As a result, hitting a Path MTU upper bound is a learning process
    - This should stop consistent SIP packet drops due to Path MTU

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3141

Commit Summary

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/pull/3141@github.com>