net: tcp: Close all connections when interface goes down

If the network interface goes down, close all TCP connections
that are bound to that interface. The reasoning here is that we
need a way to remove IP address from the interface and it might
not be possible if there is a TCP socket that is bound to that address.
If the interface comes back on, we might get the same IP address in
which case the socket closure was not really needed but it is not
possible to know in advance.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
3 files changed