Skip to content

Commit

Permalink
Add mtu-auto option
Browse files Browse the repository at this point in the history
  • Loading branch information
angt committed Dec 14, 2016
1 parent 3ba1b91 commit 3675820
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ main(int argc, char **argv)
{ "bind-port", &bind_port, option_long },
{ "dev", &dev, option_str },
{ "mtu", &mtu, option_long },
{ "mtu-auto", NULL, option_option },
{ "keyfile", &keyfile, option_str },
{ "statefile", &statefile, option_str },
{ "timeout", &gt.timeout, option_long },
Expand Down Expand Up @@ -325,7 +326,7 @@ main(int argc, char **argv)

int icmp_fd = -1;

if (v4) {
if (v4 && option_is_set(opts, "mtu-auto")) {
icmp_fd = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);

if (icmp_fd == -1)
Expand Down

0 comments on commit 3675820

Please sign in to comment.