summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorvenaas <venaas>2008-06-03 08:46:28 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-06-03 08:46:28 +0000
commit96577c5fdc7bcf7a477ae6139ea5c00a8817f10d (patch)
treebb8d12fa1e062c39d8d07a82dff97ef006f0452a /radsecproxy.c
parent3e2143717a98987f4b2e5f9609563452a0dff2eb (diff)
rpf feature added
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.1@273 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index da3e142..425378e 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1869,6 +1869,12 @@ void radsrv(struct request *rq) {
goto exit;
}
+ if (options.rpf && !strcmp(rq->from->conf->name, to->conf->name)) {
+ debug(DBG_INFO, "radsrv: RPF failed, not forwarding request from client %s to server %s, discarding",
+ rq->from->conf->name, to->conf->name);
+ goto exit;
+ }
+
if (rqinqueue(to, rq->from, id, code)) {
debug(DBG_INFO, "radsrv: already got %s from host %s with id %d, ignoring",
radmsgtype2string(code), rq->from->conf->host, id);
@@ -3082,6 +3088,7 @@ void getmainconfig(const char *configfile) {
"SourceTCP", CONF_STR, &options.sourcetcp,
"LogLevel", CONF_STR, &loglevel,
"LogDestination", CONF_STR, &options.logdestination,
+ "RPFCheck", CONF_BLN, &options.rpf,
"Client", CONF_CBK, confclient_cb,
"Server", CONF_CBK, confserver_cb,
"Realm", CONF_CBK, confrealm_cb,