mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-29 11:54:38 +01:00
pfctl: zero the number of added/deleted addresses
pfctl re-uses nadd between adding the table and adding the addresses, which lead
to potential incorrect numbers if a table was created in addition to addresses
being added.
Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
1 parent
094a60281b
commit
da64f6e047
1 file changed
+3
@@ -122,6 +122,9 @@ pfr_add_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int size,
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (*nadd)
|
||||
*nadd = 0;
|
||||
|
||||
ret = pfctl_table_add_addrs_h(pfh, tbl, addr, size, nadd, flags);
|
||||
if (ret) {
|
||||
errno = ret;
|
||||
|
||||
Reference in new issue
Block a user