Skip empty requests (this is closer to previous radclient behaviour)
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 2 Jun 2014 10:31:03 +0000 (11:31 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 2 Jun 2014 10:31:03 +0000 (11:31 +0100)
src/main/radclient.c

index 06f8acb..86ad151 100644 (file)
@@ -313,6 +313,14 @@ static int radclient_init(TALLOC_CTX *ctx, rc_file_pair_t *files)
                        goto error;
                }
 
+               /*
+                *      Skip empty entries
+                */
+               if (!request->packet->vps) {
+                       talloc_free(request);
+                       continue;
+               }
+
                fr_cursor_init(&cursor, &request->filter);
                vp = fr_cursor_next_by_num(&cursor, PW_PACKET_TYPE, 0, TAG_ANY);
                if (vp) {