};
static const LRAD_NAME_NUMBER filterCompare[] = {
- { ">", RAD_COMPARE_GREATER },
- { "=", RAD_COMPARE_EQUAL },
{ "<", RAD_COMPARE_LESS },
+ { "=", RAD_COMPARE_EQUAL },
+ { ">", RAD_COMPARE_GREATER },
{ "!=", RAD_COMPARE_NOT_EQUAL },
{ NULL, 0 },
};
token = strtok( NULL, " " );
if ( token ) {
- cmp = lrad_str2int(filterCompare, token, -1);
- if (cmp >= 0) {
+ cmp = lrad_str2int(filterCompare, token, RAD_NO_COMPARE);
+ if (cmp > RAD_NO_COMPARE) {
token = strtok( NULL, " " );
if ( token ) {
if ( tok == FILTER_IPX_DST_IPXSOCK ) {
token = strtok( NULL, " " );
if ( token ) {
- cmp = lrad_str2int(filterCompare, token, -1);
- if (cmp >= 0) {
+ cmp = lrad_str2int(filterCompare, token, RAD_NO_COMPARE);
+ if (cmp > RAD_NO_COMPARE) {
token = strtok( NULL, " " );
if ( token ) {
if( isAllDigit( token ) ) {
len -= i;
}
- if (filter.u.ip.dstPortComp) {
+ if (filter.u.ip.dstPortComp > RAD_NO_COMPARE) {
i = snprintf(p, len, " dstport %s %d",
lrad_int2str(filterCompare, filter.u.ip.dstPortComp, "??"),
ntohs(filter.u.ip.dstport));
len -= i;
}
- if (filter.u.ip.srcPortComp) {
+ if (filter.u.ip.srcPortComp > RAD_NO_COMPARE) {
i = snprintf(p, len, " srcport %s %d",
lrad_int2str(filterCompare, filter.u.ip.srcPortComp, "??"),
ntohs(filter.u.ip.srcport));
p += i;
len -= i;
- if (filter.u.ipx.srcSocComp) {
+ if (filter.u.ipx.srcSocComp > RAD_NO_COMPARE) {
i = snprintf(p, len, " srcipxsock %s 0x%04x",
lrad_int2str(filterCompare, filter.u.ipx.srcSocComp, "??"),
ntohs(filter.u.ipx.srcIpxSoc));
p += i;
len -= i;
- if (filter.u.ipx.dstSocComp) {
+ if (filter.u.ipx.dstSocComp > RAD_NO_COMPARE) {
i = snprintf(p, len, " dstipxsock %s 0x%04x",
lrad_int2str(filterCompare, filter.u.ipx.dstSocComp, "??"),
ntohs(filter.u.ipx.dstIpxSoc));