UDP over v6: payload truncated at 1024 bytes

Peter Lund peter@REDACTED
Mon Apr 5 14:10:59 CEST 2004


At least in IPv4 (and TCP) you cannot ever count on any packet
of any size to arrive at the destination without being fragmented
into 2 or more parts. If this is different for UDP and in v6,
I do not know. But hopefully someone else can tell...

> Hi
>
> I've started using IPv6 in my Erlang application and have encountered a
> problem. I open a listening socket like this :
>
> 	gen_udp:open(5060, [{reuseaddr, true}, inet6])
>
> but when I receive a datagram of size 1343 bytes over that socket (passive
> mode)
>
> 	handle_info({udp, Socket, IPlist, Port, Packet}, State) ->
>
> Packet is truncated at 1024 bytes. If I don't use inet6, and send the same
> sized packet over ordinary IPv4 UDP then it does not get truncated.
>
> tcpdump shows there really is truncation happening at the receiving end :
>
> tcpdump output :
>
> 10:01:35.123298 2001:6b0:5:987:210:dcff:fe2a:618a.5060 >
>                 2001:6b0:5:987:210:dcff:fe2a:65ab.5060: udp 1343
>
> my applications logging :
>
> 2004-04-05 10:01:35.123 debug<0.115.0>:
> 	length(Packet) is 1024, socket #Port<0.118>
> 2004-04-05 10:01:35.124 debug<0.217.0>:Packet from udp6:
> 	[2001:06b0:0005:0987:0210:dcff:fe2a:618a]:5060 (receiver: <0.115.0>) :
>
> Is this a known problem or do I perhaps just need to pass some other flag
> to
> open()?
>
> Thanks,
>
> /Fredrik
>


-- 
Peter Lund
mobile: +46 70 543 9416
http://www.lundata.se




More information about the erlang-questions mailing list