gateways: dpinger. choose a better bind candidate for IPv4.
gateways: dpinger. choose a better bind candidate for IPv4.

when an interface offers multiple addresses, we should at least try to bind to the address which can access the gateway, for example an interface with the following addresses configured:

10.0.1.1/24
10.0.2.1/24
10.0.3.1/24

and a gateway configured on 10.0.2.100 should try to bind on 10.0.2.1. when we can't find a candidate, fall back to the first. closes https://github.com/opnsense/core/pull/4221

opnsense/core,opnsense/core,opnsense/core,opnsense/core,opnsense/core,opnsense/core