summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2002-06-12 23:45:15 +0000
committerbrian <brian@FreeBSD.org>2002-06-12 23:45:15 +0000
commit514fa7d23f6019976043679704f14745fea8b8ef (patch)
tree19da65b5531e74eb1a2744ed49b1888dfbb363c8 /usr.sbin
parent9412fc32d2756170dcb8d3dfb89a1194217fad0c (diff)
downloadFreeBSD-src-514fa7d23f6019976043679704f14745fea8b8ef.zip
FreeBSD-src-514fa7d23f6019976043679704f14745fea8b8ef.tar.gz
If a RAD_FILTER_ID is supplied by the RADIUS server, treat it as an
additional label from ppp.linkup & ppp.linkdown to load. Suggested and mostly submitted by: andrew pavlov <and@kremenchug.net>
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/ipcp.c8
-rw-r--r--usr.sbin/ppp/ppp.8.m413
2 files changed, 20 insertions, 1 deletions
diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c
index b92936c..60597e2 100644
--- a/usr.sbin/ppp/ipcp.c
+++ b/usr.sbin/ppp/ipcp.c
@@ -873,6 +873,10 @@ IpcpLayerDown(struct fsm *fp)
radius_Account(&fp->bundle->radius, &fp->bundle->radacct,
fp->bundle->links, RAD_STOP, &ipcp->peer_ip, &ipcp->ifmask,
&ipcp->throughput);
+
+ if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
+ system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE,
+ NULL, NULL);
#endif
/*
@@ -936,6 +940,10 @@ IpcpLayerUp(struct fsm *fp)
#ifndef NORADIUS
radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links,
RAD_START, &ipcp->peer_ip, &ipcp->ifmask, &ipcp->throughput);
+
+ if (fp->bundle->radius.cfg.file && fp->bundle->radius.filterid)
+ system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE,
+ NULL, NULL);
#endif
/*
diff --git a/usr.sbin/ppp/ppp.8.m4 b/usr.sbin/ppp/ppp.8.m4
index bec41d6..54eccd5 100644
--- a/usr.sbin/ppp/ppp.8.m4
+++ b/usr.sbin/ppp/ppp.8.m4
@@ -5280,7 +5280,18 @@ will request VJ compression during IPCP negotiations despite any
.Dq disable vj
configuration command.
.It RAD_FILTER_ID
-This attribute is stored but not yet used.
+If this attribute is supplied,
+.Nm
+will attempt to use it as an additional label to load from the
+.Pa ppp.linkup
+and
+.Pa ppp.linkdown
+files.
+The load will be attempted before (and in addition to) the normal
+label search.
+If the label doesn't exist, no action is taken and
+.Nm
+proceeds to the normal load using the current label.
.It RAD_FRAMED_ROUTE
The received string is expected to be in the format
.Ar dest Ns Op / Ns Ar bits
OpenPOWER on IntegriCloud