!strncmp((char *) data, conn->acName, len)) {
pc->acNameOK = 1;
}
+ /* save a copy of the AC name if we can */
+ conn->actualACname = realloc(conn->actualACname, len + 1);
+ if (conn->actualACname)
+ strlcpy(conn->actualACname, (char *) data, len + 1);
break;
case TAG_SERVICE_NAME:
pc->seenServiceName = 1;
ppp_set_remote_number(remote_number);
ppp_script_setenv("MACREMOTE", remote_number, 0);
+ if (conn->actualACname)
+ ppp_script_setenv("ACNAME", conn->actualACname, 0);
if (connect(conn->sessionSocket, (struct sockaddr *) &sp,
sizeof(struct sockaddr_pppox)) < 0) {
sendPADT(conn, NULL);
close(conn->discoverySocket);
}
+ free(conn->actualACname);
+ conn->actualACname = NULL;
}
static void
int storedmru; /* Stored MRU */
int mtu;
int mru;
+ char *actualACname; /* Name of AC we connected to */
} PPPoEConnection;
/* Structure used to determine acceptable PADO or PADS packet */
.B WINS2
If the peer supplies WINS server addresses, this variable is set to the
second WINS server address supplied.
+.TP
+.B ACNAME
+If the pppoe plugin is used to establish a connection to an access
+concentrator (AC), this variable is set to the name of the AC, as
+supplied by the AC.
.P
.P
Pppd invokes the following scripts, if they exist. It is not an error