don't write empty packets to the detail file
authorAlan T. DeKok <aland@freeradius.org>
Thu, 26 Jan 2017 20:34:30 +0000 (15:34 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 26 Jan 2017 20:34:30 +0000 (15:34 -0500)
src/modules/rlm_detail/rlm_detail.c

index cc9bd6c..d5f1f68 100644 (file)
@@ -224,6 +224,11 @@ static int detail_write(FILE *out, rlm_detail_t *inst, REQUEST *request, RADIUS_
        VALUE_PAIR *vp;
        char timestamp[256];
 
+       if (!packet->vps) {
+               RWDEBUG("Skipping empty packet");
+               return 0;
+       }
+
        if (radius_xlat(timestamp, sizeof(timestamp), request, inst->header, NULL, NULL) < 0) {
                return -1;
        }