net: lwm2m: Fix address length at connect
net: lwm2m: Fix address length at connect

If NET_IPV4 and NET_SOCKETS_PACKET is enabled, NET_SOCKADDR_MAX_SIZE will
be bigger than the ipv4 address length.
This is a problem when DTLS is used as the address comparison will fail
because of the different length of the received and the stored address.
This is also a problem if NET_IPV6 and NET_IPV4 is enabled and the remote
address is a ipv4 address

Signed-off-by: Benjamin Bigler <e2ef60cbfe2dfa3b565b5731341d2fb622d6dd05@securiton.ch>

zephyrproject-rtos/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,galak/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,finikorg/zephyr,finikorg/zephyr,galak/zephyr