net: conn: Check connection address family properly
net: conn: Check connection address family properly

When a connection handler was registered, the checker function
introduced in commit 43b37cef ("Check duplicate UDP/TCP connection
handlers") did not check the address family (IPv4 or IPv6) of
the local end point properly. This caused duplicate connection
error to be returned to the caller.

Signed-off-by: Jukka Rissanen <f9f077d1da4c7aa947f9864fa5a28c3588f6a45d@linux.intel.com>

mbolivar/zephyr,fractalclone/zephyr-riscv,zephyrproject-rtos/zephyr,Vudentz/zephyr,punitvara/zephyr,explora26/zephyr,nashif/zephyr,punitvara/zephyr,holtmann/zephyr,nashif/zephyr,galak/zephyr,rsalveti/zephyr,GiulianoFranchetto/zephyr,pklazy/zephyr,kraj/zephyr,aceofall/zephyr-iotos,runchip/zephyr-cc3220,pklazy/zephyr,fbsder/zephyr,finikorg/zephyr,kraj/zephyr,Vudentz/zephyr,mbolivar/zephyr,bigdinotech/zephyr,Vudentz/zephyr,Vudentz/zephyr,aceofall/zephyr-iotos,nashif/zephyr,explora26/zephyr,sharronliu/zephyr,fractalclone/zephyr-riscv,holtmann/zephyr,aceofall/zephyr-iotos,finikorg/zephyr,zephyriot/zephyr,holtmann/zephyr,runchip/zephyr-cc3220,GiulianoFranchetto/zephyr,ldts/zephyr,explora26/zephyr,zephyrproject-rtos/zephyr,kraj/zephyr,sharronliu/zephyr,aceofall/zephyr-iotos,zephyrproject-rtos/zephyr,rsalveti/zephyr,fractalclone/zephyr-riscv,punitvara/zephyr,fractalclone/zephyr-riscv,punitvara/zephyr,bigdinotech/zephyr,ldts/zephyr,ldts/zephyr,rsalveti/zephyr,pklazy/zephyr,bigdinotech/zephyr,kraj/zephyr,mbolivar/zephyr,punitvara/zephyr,zephyriot/zephyr,runchip/zephyr-cc3220,finikorg/zephyr,sharronliu/zephyr,zephyriot/zephyr,explora26/zephyr,ldts/zephyr,GiulianoFranchetto/zephyr,explora26/zephyr,bigdinotech/zephyr,nashif/zephyr,kraj/zephyr,fbsder/zephyr,sharronliu/zephyr,nashif/zephyr,galak/zephyr,mbolivar/zephyr,galak/zephyr,runchip/zephyr-cc3220,zephyrproject-rtos/zephyr,bigdinotech/zephyr,galak/zephyr,rsalveti/zephyr,GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,zephyriot/zephyr,ldts/zephyr,holtmann/zephyr,galak/zephyr,fbsder/zephyr,pklazy/zephyr,fractalclone/zephyr-riscv,sharronliu/zephyr,fbsder/zephyr,rsalveti/zephyr,holtmann/zephyr,zephyriot/zephyr,zephyrproject-rtos/zephyr,mbolivar/zephyr,finikorg/zephyr,Vudentz/zephyr,finikorg/zephyr,aceofall/zephyr-iotos,runchip/zephyr-cc3220,fbsder/zephyr,Vudentz/zephyr,pklazy/zephyr