Skip to content

Commit a2406d1

Browse files
committed
Set MTU to 1200
1 parent 2c9e31a commit a2406d1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

c_src/ex_dtls/bio_frag.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ static long callback_ctrl(BIO *bio, int cmd, BIO_info_cb *fp);
1212
static BIO_METHOD *bio_methods = NULL;
1313

1414
#define MAX_FRAGS 100
15+
#define MTU 1200
1516

1617
struct Ctx {
1718
int frag_sizes[MAX_FRAGS];
@@ -124,6 +125,8 @@ static long ctrl(BIO *bio, int cmd, long num, void *ptr) {
124125

125126
if (cmd == BIO_CTRL_PENDING) {
126127
return ctx->frag_sizes[ctx->riter];
128+
} else if (cmd == BIO_CTRL_DGRAM_QUERY_MTU) {
129+
return MTU;
127130
}
128131

129132
return BIO_ctrl(next, cmd, num, ptr);

test/integration_test.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
defmodule ExDTLS.IntegrationTest do
22
use ExUnit.Case, async: true
33

4+
@tag :debug
45
test "dtls_srtp" do
56
rx_dtls = ExDTLS.init(mode: :server, dtls_srtp: true, verify_peer: true)
67
tx_dtls = ExDTLS.init(mode: :client, dtls_srtp: true, verify_peer: true)

0 commit comments

Comments
 (0)