PR: https://github.com/opnsense/core/issues/1018 (cherry picked from commit b9ff688b) (cherry picked from commit e98569bb)