Skip to content

Commit

Permalink
Sanitize return codes. "do nothing" is NOOP
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Apr 11, 2014
1 parent cc6f855 commit e9f5f44
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/modules/rlm_realm/rlm_realm.c
Expand Up @@ -85,7 +85,7 @@ static int check_for_realm(void *instance, REQUEST *request, REALM **returnrealm
) {

RDEBUG2("Proxy reply, or no User-Name. Ignoring");
return RLM_MODULE_OK;
return RLM_MODULE_NOOP;
}

/*
Expand All @@ -95,7 +95,7 @@ static int check_for_realm(void *instance, REQUEST *request, REALM **returnrealm

if (pairfind(request->packet->vps, PW_REALM, 0, TAG_ANY) != NULL ) {
RDEBUG2("Request already has destination realm set. Ignoring");
return RLM_MODULE_OK;
return RLM_MODULE_NOOP;
}

/*
Expand Down Expand Up @@ -216,7 +216,7 @@ static int check_for_realm(void *instance, REQUEST *request, REALM **returnrealm
default:
RDEBUG2("Unknown packet code %d\n",
request->packet->code);
return RLM_MODULE_OK; /* don't do anything */
return RLM_MODULE_NOOP;

/*
* Perhaps accounting proxying was turned off.
Expand Down Expand Up @@ -429,8 +429,8 @@ static rlm_rcode_t realm_recv_coa(UNUSED void *instance, REQUEST *request)
REALM *realm;

if (pairfind(request->packet->vps, PW_REALM, 0, TAG_ANY) != NULL) {
RDEBUG2("Request already has destination realm set. Ignoring");
return RLM_MODULE_OK;
RDEBUG2("Request already has destination realm set. Ignoring");
return RLM_MODULE_NOOP;
}

vp = pairfind(request->packet->vps, PW_OPERATOR_NAME, 0, TAG_ANY);
Expand Down Expand Up @@ -494,3 +494,4 @@ module_t rlm_realm = {
#endif
},
};

0 comments on commit e9f5f44

Please sign in to comment.