Some radius servers will not accept accounting packets without CLASS
attribute, so this includes it.
Signed-off-by: Hauras Wigelstukas Alex <sysop@880.ru>
rc_avpair_add(&send, PW_USER_NAME, rstate.user, 0, VENDOR_NONE);
rc_avpair_add(&send, PW_USER_NAME, rstate.user, 0, VENDOR_NONE);
+ if (rstate.class_len > 0)
+ rc_avpair_add(&send, PW_CLASS,
+ rstate.class, rstate.class_len, VENDOR_NONE);
+
av_type = PW_STATUS_STOP;
rc_avpair_add(&send, PW_ACCT_STATUS_TYPE, &av_type, 0, VENDOR_NONE);
av_type = PW_STATUS_STOP;
rc_avpair_add(&send, PW_ACCT_STATUS_TYPE, &av_type, 0, VENDOR_NONE);
rc_avpair_add(&send, PW_USER_NAME, rstate.user, 0, VENDOR_NONE);
rc_avpair_add(&send, PW_USER_NAME, rstate.user, 0, VENDOR_NONE);
+ if (rstate.class_len > 0)
+ rc_avpair_add(&send, PW_CLASS,
+ rstate.class, rstate.class_len, VENDOR_NONE);
+
av_type = PW_STATUS_ALIVE;
rc_avpair_add(&send, PW_ACCT_STATUS_TYPE, &av_type, 0, VENDOR_NONE);
av_type = PW_STATUS_ALIVE;
rc_avpair_add(&send, PW_ACCT_STATUS_TYPE, &av_type, 0, VENDOR_NONE);