[RFCLAT#5] remove the unnecessary tun fd, socket handler and socket opt cleanup
- Closing tun fd is not necessary because any open fds are closed
when a process exits
- Closing socket fds are not necessary because any open fds are
closed when a process exits
- Applying IPV6_LEAVE_ANYCAST is not necessary because the setting is
stored with the socket and removed when it is closed
See addrconf_ifdown, ipv6_ac_destroy_dev
Bug: 212345928
Test: atest clatd_test and manual test
1. Connect to ipv6-only wifi.
2. Try IPv4 traffic.
$ ping 8.8.8.8
Change-Id: I8002c1adef208f5dcd6665fecee0df6236159f88
diff --git a/main.c b/main.c
index ef5e3ab..069592f 100644
--- a/main.c
+++ b/main.c
@@ -178,11 +178,6 @@
event_loop(&tunnel);
logmsg(ANDROID_LOG_INFO, "Shutting down clat on %s", uplink_interface);
- del_anycast_address(tunnel.write_fd6, &Global_Clatd_Config.ipv6_local_subnet);
-
- close(tunnel.write_fd6);
- close(tunnel.read_fd6);
- close(tunnel.fd4);
if (running) {
logmsg(ANDROID_LOG_INFO, "Clatd on %s waiting for SIGTERM", uplink_interface);