X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Foptions.c;h=482eab99e3274086d7c6b13aac4b7c1254045c27;hb=275b3d6e8901b22a609567717f7dab56c8b67f2d;hp=0285b1bb8d3c629dbc14de2ae4af6a49353c039b;hpb=24e466be1406bfedce7be9ca2dba21c9323f4e4e;p=ppp.git diff --git a/pppd/options.c b/pppd/options.c index 0285b1b..482eab9 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -40,7 +40,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: options.c,v 1.101 2008/06/03 12:07:13 paulus Exp $" +#define RCSID "$Id: options.c,v 1.102 2008/06/15 06:53:06 paulus Exp $" #include #include @@ -796,6 +796,10 @@ process_option(opt, cmd, argv) break; } + /* + * If addr2 wasn't used by any flag (OPT_A2COPY, etc.) but is set, + * treat it as a bool and set/clear it based on the OPT_A2CLR bit. + */ if (opt->addr2 && (opt->flags & (OPT_A2COPY|OPT_ENABLE |OPT_A2PRINTER|OPT_A2STRVAL|OPT_A2LIST|OPT_A2OR)) == 0) *(bool *)(opt->addr2) = !(opt->flags & OPT_A2CLR);