mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-25 03:54:17 +01:00
Use the new-style ngpppoe_init_data structure.
Approved by: archie
This commit is contained in:
parent
76a70671fc
commit
fbf0385368
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68032
@ -230,10 +230,9 @@ ConfigureNode(const char *prog, const char *iface, const char *provider,
|
||||
|
||||
plen = strlen(provider);
|
||||
|
||||
data = (struct ngpppoe_init_data *)alloca(sizeof *data + plen + 1);
|
||||
data = (struct ngpppoe_init_data *)alloca(sizeof *data + plen);
|
||||
snprintf(data->hook, sizeof data->hook, "%s", ngc->peerhook);
|
||||
strcpy(data->data, provider);
|
||||
data->data_len = plen;
|
||||
|
||||
spath = (char *)alloca(strlen(ngc->peerhook) + 3);
|
||||
strcpy(spath, ".:");
|
||||
@ -323,10 +322,9 @@ Spawn(const char *prog, const char *acname, const char *exec,
|
||||
|
||||
/* Put the PPPoE node into OFFER mode */
|
||||
slen = strlen(acname);
|
||||
data = (struct ngpppoe_init_data *)alloca(sizeof *data + slen + 1);
|
||||
data = (struct ngpppoe_init_data *)alloca(sizeof *data + slen);
|
||||
snprintf(data->hook, sizeof data->hook, "%s", ngc.ourhook);
|
||||
strcpy(data->data, acname);
|
||||
data->data_len = slen;
|
||||
|
||||
path = (char *)alloca(strlen(ngc.ourhook) + 3);
|
||||
strcpy(path, ".:");
|
||||
|
@ -584,11 +584,10 @@ ether_Create(struct physical *p)
|
||||
|
||||
/* And finally, request a connection to the given provider */
|
||||
|
||||
data = (struct ngpppoe_init_data *)alloca(sizeof *data + providerlen + 1);
|
||||
data = (struct ngpppoe_init_data *)alloca(sizeof *data + providerlen);
|
||||
|
||||
snprintf(data->hook, sizeof data->hook, "%s", dev->hook);
|
||||
strcpy(data->data, provider);
|
||||
data->data_len = providerlen;
|
||||
|
||||
snprintf(connectpath, sizeof connectpath, ".:%s", dev->hook);
|
||||
log_Printf(LogDEBUG, "Sending PPPOE_CONNECT to %s\n", connectpath);
|
||||
|
Loading…
Reference in New Issue
Block a user