mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-28 05:55:27 +01:00
Initialise this to zero before using it to configure the vlangroup
information. PR: kern/177871 Submitted by: Luiz Otavio O Souza <loos.br@gmail.com>
This commit is contained in:
parent
e14ddd1f16
commit
e1d6379074
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249747
@ -139,6 +139,7 @@ set_port_vlangroup(struct cfg *cfg, char *argv[])
|
|||||||
v = strtol(argv[1], NULL, 0);
|
v = strtol(argv[1], NULL, 0);
|
||||||
if (v < 0 || v >= cfg->info.es_nvlangroups)
|
if (v < 0 || v >= cfg->info.es_nvlangroups)
|
||||||
errx(EX_USAGE, "vlangroup must be between 0 and %d", cfg->info.es_nvlangroups-1);
|
errx(EX_USAGE, "vlangroup must be between 0 and %d", cfg->info.es_nvlangroups-1);
|
||||||
|
bzero(&p, sizeof(p));
|
||||||
p.es_port = cfg->unit;
|
p.es_port = cfg->unit;
|
||||||
if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0)
|
if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0)
|
||||||
err(EX_OSERR, "ioctl(IOETHERSWITCHGETPORT)");
|
err(EX_OSERR, "ioctl(IOETHERSWITCHGETPORT)");
|
||||||
|
Loading…
Reference in New Issue
Block a user