mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Handle NGM_PPPOE_ACNAME messages.
Submitted by: Andre Albsmeier <andre@albsmeier.net> Approved by: julian
This commit is contained in:
parent
c48a0b5fb4
commit
7f77b55938
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90975
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -254,6 +254,11 @@ ether_MessageIn(struct etherdevice *dev)
|
|||
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)
|
||||
log_Printf(LogWARN, "setenv: cannot set ACNAME=%s: %m", sts->hook);
|
||||
break;
|
||||
default:
|
||||
snprintf(unknown, sizeof unknown, "<%d>", (int)rep->header.cmd);
|
||||
msg = unknown;
|
||||
|
|
Loading…
Reference in a new issue