nrf9160: MQTT connect fails with IPv6 (AF_INET6)

We are trying to connect MQTT over IPv6 with nrf9160dk and custom board. We are using mqtt_simple sample.

Software NCS version: NCS main (latest)

Changes in the code: MQTT Broker is AWS

As seen in the below log, we are able to resolve the IPv6 address and not able to connect with mqtt_connect.

Any help is highly appreciated!

```
*** Booting Zephyr OS build v3.0.99-ncs1-13-g85a003480961  ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: none
I: Bootloader chainload address offset: 0x10000
*** Booting Zephyr OS build v3.0.99-ncs1-13-g85a003480961  ***
MQTT AWS Jobs FOTA Sample, version: v1.0.0
LTE Link Connecting ...
+CEREG: 2,"55F2","004F3902",7
+CSCON: 1
+CEREG: 5,"55F2","004F3902",7,,,"11100000","00101100"
LTE Link Connected!
IPv6 Address 2406:da00:ff00::3448:4f7b
client_id: your_client_id
ERROR: mqtt_connect -114
+CSCON: 0
```

Related