X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Foptions.c;h=36cf47fb9338948fb225707c85c9b7ed7f280143;hb=e52aee3c8746d931ec428f6cb1a93dbffbcb740b;hp=f66b7657bc31c9b197b8449fa12902293fdf85d1;hpb=f8c05f21cc743132fb7c4b996568c09a374725b9;p=ppp.git diff --git a/pppd/options.c b/pppd/options.c index f66b765..36cf47f 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -121,6 +121,7 @@ bool dryrun; /* print out option values and exit */ char *domain; /* domain name set by domain option */ int child_wait = 5; /* # seconds to wait for children at exit */ struct userenv *userenv_list; /* user environment variables */ +int dfl_route_metric = -1; /* metric of the default route to set over the PPP link */ #ifdef MAXOCTETS unsigned int maxoctets = 0; /* default - no limit */ @@ -299,6 +300,10 @@ option_t general_options[] = { "Unset user environment variable", OPT_A2PRINTER | OPT_NOPRINT, (void *)user_unsetprint }, + { "defaultroute-metric", o_int, &dfl_route_metric, + "Metric to use for the default route (Linux only; -1 for default behavior)", + OPT_PRIV|OPT_LLIMIT|OPT_INITONLY, NULL, 0, -1 }, + #ifdef HAVE_MULTILINK { "multilink", o_bool, &multilink, "Enable multilink operation", OPT_PRIO | 1 }, @@ -974,7 +979,7 @@ print_option(opt, mainopt, printer, arg) p = (char *) opt->addr2; if ((opt->flags & OPT_STATIC) == 0) p = *(char **)p; - printer("%q", p); + printer(arg, "%q", p); } else if (opt->flags & OPT_A2LIST) { struct option_value *ovp;