mirror of
https://github.com/opnsense/src.git
synced 2026-04-20 21:59:20 -04:00
Return zero from get_addrselectpolicy() when no source-address-selection
policy is installed. MFC after: 1 week
This commit is contained in:
parent
bc84db6267
commit
0c19b5de29
1 changed files with 2 additions and 0 deletions
|
|
@ -692,6 +692,8 @@ get_addrselectpolicy(struct policyhead *head)
|
|||
|
||||
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &l, NULL, 0) < 0)
|
||||
return (0);
|
||||
if (l == 0)
|
||||
return (0);
|
||||
if ((buf = malloc(l)) == NULL)
|
||||
return (0);
|
||||
if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), buf, &l, NULL, 0) < 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue