Skip to content
  • Willem de Bruijn's avatar
    ipv6: add IPV6_RECVFRAGSIZE cmsg · 0cc0aa61
    Willem de Bruijn authored
    
    
    When reading a datagram or raw packet that arrived fragmented, expose
    the maximum fragment size if recorded to allow applications to
    estimate receive path MTU.
    
    At this point, the field is only recorded when ipv6 connection
    tracking is enabled. A follow-up patch will record this field also
    in the ipv6 input path.
    
    Tested using the test for IP_RECVFRAGSIZE plus
    
      ip netns exec to ip addr add dev veth1 fc07::1/64
      ip netns exec from ip addr add dev veth0 fc07::2/64
    
      ip netns exec to ./recv_cmsg_recvfragsize -6 -u -p 6000 &
      ip netns exec from nc -q 1 -u fc07::1 6000 < payload
    
    Both with and without enabling connection tracking
    
      ip6tables -A INPUT -m state --state NEW -p udp -j LOG
    
    Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
    Acked-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0cc0aa61