Update ifr_name before invoking IPSECSREQID ioctl, this fixes the case,
when `ifconfig ipsec create reqid N` command invoked without interface unit number. The "name" global variable is updated after interface cloning in the ifclonecreate() and contains actual interface name. Reported by: lev Approved by: re (kib) MFC after: 1 week
This commit is contained in:
parent
6577e8c44b
commit
068273571b
@ -72,6 +72,7 @@ DECL_CMD_FUNC(setreqid, val, arg)
|
|||||||
warn("Invalid reqid value %s", val);
|
warn("Invalid reqid value %s", val);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
|
||||||
ifr.ifr_data = (char *)&v;
|
ifr.ifr_data = (char *)&v;
|
||||||
if (ioctl(s, IPSECSREQID, &ifr) == -1) {
|
if (ioctl(s, IPSECSREQID, &ifr) == -1) {
|
||||||
warn("ioctl(IPSECSREQID)");
|
warn("ioctl(IPSECSREQID)");
|
||||||
|
Loading…
Reference in New Issue
Block a user