diff --git a/mud b/mud index 7c90d54..2d4804a 160000 --- a/mud +++ b/mud @@ -1 +1 @@ -Subproject commit 7c90d54b911f677c7e95554f748a918e6304e6e7 +Subproject commit 2d4804af5af8d406c117ce44d6ecd21191dd1c74 diff --git a/src/main.c b/src/main.c index c84b320..3f97171 100644 --- a/src/main.c +++ b/src/main.c @@ -28,11 +28,7 @@ static struct { char *keyfile; char *host; long port; - struct { - char *list; - char *backup; - long port; - } bind; + long bind_port; long mtu; long timeout; long time_tolerance; @@ -49,9 +45,7 @@ static struct { } buf; } gt = { .port = 5000, - .bind = { - .port = 5000, - }, + .bind_port = 5000, .mtu = 1500, .timeout = 5000, .ipv4 = 1, @@ -183,9 +177,7 @@ gt_setup_option(int argc, char **argv) struct option opts[] = { { "host", >.host, option_str }, { "port", >.port, option_long }, - { "bind", >.bind.list, option_str }, - { "bind-backup", >.bind.backup, option_str }, - { "bind-port", >.bind.port, option_long }, + { "bind-port", >.bind_port, option_long }, { "dev", >.dev, option_str }, { "persist", NULL, option_option }, { "mtu", >.mtu, option_long }, @@ -284,7 +276,7 @@ main(int argc, char **argv) gt_log("couldn't create ICMP socket\n"); } - struct mud *mud = mud_create(gt.bind.port, gt.ipv4, gt.ipv6); + struct mud *mud = mud_create(gt.bind_port, gt.ipv4, gt.ipv6); if (!mud) { gt_log("couldn't create mud\n"); @@ -339,37 +331,6 @@ main(int argc, char **argv) perror("mud_peer"); return 1; } - - if (gt.bind.backup) { - if (mud_add_path(mud, gt.bind.backup, 1)) { - perror("mud_add_path (backup)"); - return 1; - } - } - - if (gt.bind.list) { - char tmp[1024]; - char *name = &tmp[0]; - - str_cpy(tmp, sizeof(tmp) - 1, gt.bind.list); - - while (*name) { - char *p = name; - - while (*p && *p != ',') - p++; - - if (*p) - *p++ = 0; - - if (mud_add_path(mud, name, 0)) { - perror("mud_add_path"); - return 1; - } - - name = p; - } - } } gt_setup_mtu(mud, tun_name);