Skip to content

Commit

Permalink
parse diverter options
Browse files Browse the repository at this point in the history
  • Loading branch information
scareything committed Dec 3, 2024
1 parent 4dac8e4 commit 5b99de0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions programs/ziti-edge-tunnel/ziti-edge-tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,17 @@ static int run_opts(int argc, char *argv[]) {
while ((c = getopt_long(argc, argv, "i:I:v:r:d:u:x:",
run_options, &option_index)) != -1) {
switch (c) {
#if __linux__
case 'D':
diverter = true;
diverter_if = optarg;
break;
case 'f':
diverter = true;
firewall = true;
diverter_if = optarg;
break;
#endif
case 'i': {
struct cfg_instance_s *inst = calloc(1, sizeof(struct cfg_instance_s));
inst->cfg = strdup(optarg);
Expand Down Expand Up @@ -2730,8 +2741,8 @@ static CommandLine enroll_cmd = make_command(
parse_enroll_opts, enroll);
#if __linux__
#define DIVERTER_OPTS_SUMMARY "[-D|--diverter <interface list>] [-f|--diverter-fw <interface list>] "
#define DIVERTER_OPTS_DETAIL "\t-D|--diverter <interface>\tset diverter mode to true on <interface>\n" \
"\t-f|--diverter-fw <interface>\tset diverter to true in firewall mode on <interface>)\n"
#define DIVERTER_OPTS_DETAIL "\t-D|--diverter <interface list>\tset diverter mode to true on <interface list>\n" \
"\t-f|--diverter-fw <interface list>\tset diverter to true in firewall mode on <interface list>)\n"
#else
#define DIVERTER_OPTS_SUMMARY ""
#define DIVERTER_OPTS_DETAIL ""
Expand Down

0 comments on commit 5b99de0

Please sign in to comment.