RFC 5389 says:
All STUN messages sent over UDP SHOULD be less than the path MTU, if
known. If the path MTU is unknown, messages SHOULD be the smaller of
576 bytes and the first-hop MTU for IPv4 [RFC1122] and 1280 bytes for
IPv6 [RFC2460].
So sending 65536 bytes is always wrong
guint stream_id;
guint component_id;
StunTimer timer;
- uint8_t stun_buffer[STUN_MAX_MESSAGE_SIZE];
+ uint8_t stun_buffer[STUN_MAX_MESSAGE_SIZE_IPV6];
StunMessage stun_message;
};
NiceAddress stun_server;
if (nice_address_set_from_string (&stun_server, agent->stun_server_ip)) {
StunAgent stun_agent;
- uint8_t stun_buffer[STUN_MAX_MESSAGE_SIZE];
+ uint8_t stun_buffer[STUN_MAX_MESSAGE_SIZE_IPV6];
StunMessage stun_message;
size_t buffer_len = 0;
guint64 priority;
GTimeVal next_tick; /* next tick timestamp */
StunTimer timer;
- uint8_t stun_buffer[STUN_MAX_MESSAGE_SIZE];
+ uint8_t stun_buffer[STUN_MAX_MESSAGE_SIZE_IPV6];
StunMessage stun_message;
};
TurnServer *turn;
StunAgent stun_agent;
StunTimer timer;
- uint8_t stun_buffer[STUN_MAX_MESSAGE_SIZE];
+ uint8_t stun_buffer[STUN_MAX_MESSAGE_SIZE_IPV6];
StunMessage stun_message;
uint8_t stun_resp_buffer[STUN_MAX_MESSAGE_SIZE];
StunMessage stun_resp_msg;
GSource *timer_source;
GSource *tick_source;
StunTimer timer;
- uint8_t stun_buffer[STUN_MAX_MESSAGE_SIZE];
+ uint8_t stun_buffer[STUN_MAX_MESSAGE_SIZE_IPV6];
StunMessage stun_message;
uint8_t stun_resp_buffer[STUN_MAX_MESSAGE_SIZE];
StunMessage stun_resp_msg;