summaryrefslogtreecommitdiffstats
path: root/libexec/pppoed
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2002-02-20 15:52:20 +0000
committerbrian <brian@FreeBSD.org>2002-02-20 15:52:20 +0000
commit1af410bad48c6f61db8e27359c2fb565f0bf3398 (patch)
treedd3124fef0cc45253b3fa682bc6b6a0b7dde293c /libexec/pppoed
parentc53e73d628ce85e58c9e9036af405ce5349880a3 (diff)
downloadFreeBSD-src-1af410bad48c6f61db8e27359c2fb565f0bf3398.zip
FreeBSD-src-1af410bad48c6f61db8e27359c2fb565f0bf3398.tar.gz
Handle NGM_PPPOE_ACNAME messages.
Submitted by: Andre Albsmeier <andre@albsmeier.net> Approved by: julian
Diffstat (limited to 'libexec/pppoed')
-rw-r--r--libexec/pppoed/pppoed.88
-rw-r--r--libexec/pppoed/pppoed.c6
2 files changed, 11 insertions, 3 deletions
diff --git a/libexec/pppoed/pppoed.8 b/libexec/pppoed/pppoed.8
index c54aa46..eedaa4a 100644
--- a/libexec/pppoed/pppoed.8
+++ b/libexec/pppoed/pppoed.8
@@ -110,10 +110,12 @@ data socket
.Xr ng_socket 4 )
when started.
.Pp
-The environment variable
+The environment variables
.Ev HISMACADDR
-is made available to the child process and is set to the MAC address of
-the peer.
+and
+.Ev ACNAME
+are made available to the child process and are set to the MAC address of
+the peer and the name of the AC respectively.
.Pp
Upon invocation,
.Nm
diff --git a/libexec/pppoed/pppoed.c b/libexec/pppoed/pppoed.c
index 97d7f37..63f7325 100644
--- a/libexec/pppoed/pppoed.c
+++ b/libexec/pppoed/pppoed.c
@@ -405,6 +405,12 @@ Spawn(const char *prog, const char *acname, const char *provider,
case NGM_PPPOE_FAIL: msg = "FAIL"; break;
case NGM_PPPOE_CLOSE: msg = "CLOSE"; break;
case NGM_PPPOE_GET_STATUS: msg = "GET_STATUS"; break;
+ case NGM_PPPOE_ACNAME:
+ msg = "ACNAME";
+ if (setenv("ACNAME", sts->hook, 1) != 0)
+ syslog(LOG_WARNING, "setenv: cannot set ACNAME=%s: %m",
+ sts->hook);
+ break;
default:
snprintf(unknown, sizeof unknown, "<%d>", (int)rep->header.cmd);
msg = unknown;
OpenPOWER on IntegriCloud