|
@@ -952,10 +952,12 @@ extern int totemudpu_iface_check (void *udpu_context)
|
|
|
|
|
|
|
|
extern void totemudpu_net_mtu_adjust (void *udpu_context, struct totem_config *totem_config)
|
|
extern void totemudpu_net_mtu_adjust (void *udpu_context, struct totem_config *totem_config)
|
|
|
{
|
|
{
|
|
|
-#define UDPIP_HEADER_SIZE (20 + 8) /* 20 bytes for ip 8 bytes for udp */
|
|
|
|
|
|
|
+
|
|
|
|
|
+ assert(totem_config->interface_count > 0);
|
|
|
|
|
+
|
|
|
totem_config->net_mtu -= crypto_sec_header_size(totem_config->crypto_cipher_type,
|
|
totem_config->net_mtu -= crypto_sec_header_size(totem_config->crypto_cipher_type,
|
|
|
totem_config->crypto_hash_type) +
|
|
totem_config->crypto_hash_type) +
|
|
|
- UDPIP_HEADER_SIZE;
|
|
|
|
|
|
|
+ totemip_udpip_header_size(totem_config->interfaces[0].bindnet.family);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const char *totemudpu_iface_print (void *udpu_context) {
|
|
const char *totemudpu_iface_print (void *udpu_context) {
|