Re: Freeradius-Users Digest, Vol 21, Issue 58



Mike wrote:
> All,
> When trying to use the "radauth" tool from nagios to monitor
> freeradius, I get the following in the freeradius log:
>
> Error: WARNING: Malformed RADIUS packet from host ... too long (length
> 18432 > maximum 4096)
>
> radtest seems to be ok.  has anyone else experienced this or knows
> what is wrong?

  I haven't seen it.  I note that 18432 is hex 0x7200.  I suspect that
the NAGIOS people missed a 'htons()' somewhere, and the field should be
0x0072.

Alan,
You are exactly correct.  Good catch.  For mailing list archives, the
simplest patch I came up with:

 /* copy the first 20 bytes of the radius header.  this size is static
  * per RFC.
  */
 radhead->rad_length = htons(radhead->rad_length);
 memcpy(packet,(char *)radhead,20);
 radhead->rad_length = ntohs(radhead->rad_length);

rad_length is used elsewhere, so this is done to avoid breaking anything else.

Thanks for your help!  (I wonder how this always worked for xtradius
from the same machine?)




This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.