UDP over v6: payload truncated at 1024 bytes

Fredrik Thulin <>
Mon Apr 5 12:42:58 CEST 2004


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




More information about the erlang-questions mailing list