[patch] radtest PPPhint option is not parsed properly

Brian Candler B.Candler at pobox.com
Fri Sep 28 10:40:20 CEST 2012


On Thu, Sep 27, 2012 at 08:57:38AM -0400, John Dennis wrote:
> shouldn't the comparison to zero be performed
> with the integer operator -ne?

I don't think so, because it bombs if given a non-numeric value.

    $ [ "Y" -ne "0" ]
    -bash: [: Y: integer expression expected

This would break anyone who is currently passing an arbitrary non-blank
string as the ppphint argument.

Of course, the documentation should probably be made consistent:

  .IP ppphint
  If you put an integer > 0 here, radtest (or actually radclient) will
  add the attribute \fIFramed-Protocol = PPP\fP to the request packet.

-->

  If you put a value other than empty string or "0" here ...

Regards,

Brian.


More information about the Freeradius-Devel mailing list