Thanks Simon and Sylvain for the response.
I am not using IPv4-mapped IPv6 address.
I have a IPv4 socket running on port 80. I anticipated that HTTP request from IPv4 hosts will reach this socket, whereas requests from IPv6 hosts should not. However it is not the case. I can see packets from IPv6 hosts also received on the same socket. Entire TCP request-response workflow works well using the device's IPv6 address if the initial TCP request is from IPv6 host.
However if there is TCP SYN flood from IPv6 hosts, then the TCP listen backlog queue gets full. Hence the fix mentioned in the earlier patch is required. I knew that this fix is not the right fix. However the rest of the lwip stack processes IPv6 requests seamlessly even if socket is configured for IPv4. So question is here whether this handling is purposefully kept simple or its work to be done? In later case my fix is not required.