Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136857065
D28106.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28106.diff
View Options
diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c
--- a/sys/net/if_tuntap.c
+++ b/sys/net/if_tuntap.c
@@ -123,7 +123,7 @@
#define TUN_OPEN 0x0001
#define TUN_INITED 0x0002
#define TUN_UNUSED1 0x0008
-#define TUN_DSTADDR 0x0010
+#define TUN_UNUSED2 0x0010
#define TUN_LMODE 0x0020
#define TUN_RWAIT 0x0040
#define TUN_ASYNC 0x0080
@@ -1160,19 +1160,8 @@
/* Delete all addresses and routes which reference this interface. */
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
- struct ifaddr *ifa;
-
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
TUN_UNLOCK(tp);
- CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
- /* deal w/IPv4 PtP destination; unlocked read */
- if (!l2tun && ifa->ifa_addr->sa_family == AF_INET) {
- rtinit(ifa, (int)RTM_DELETE,
- tp->tun_flags & TUN_DSTADDR ? RTF_HOST : 0);
- } else {
- rtinit(ifa, (int)RTM_DELETE, 0);
- }
- }
if_purgeaddrs(ifp);
TUN_LOCK(tp);
}
@@ -1197,10 +1186,6 @@
tuninit(struct ifnet *ifp)
{
struct tuntap_softc *tp = ifp->if_softc;
-#ifdef INET
- struct epoch_tracker et;
- struct ifaddr *ifa;
-#endif
TUNDEBUG(ifp, "tuninit\n");
@@ -1209,21 +1194,6 @@
if ((tp->tun_flags & TUN_L2) == 0) {
ifp->if_flags |= IFF_UP;
getmicrotime(&ifp->if_lastchange);
-#ifdef INET
- NET_EPOCH_ENTER(et);
- CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
- if (ifa->ifa_addr->sa_family == AF_INET) {
- struct sockaddr_in *si;
-
- si = (struct sockaddr_in *)ifa->ifa_dstaddr;
- if (si && si->sin_addr.s_addr) {
- tp->tun_flags |= TUN_DSTADDR;
- break;
- }
- }
- }
- NET_EPOCH_EXIT(et);
-#endif
TUN_UNLOCK(tp);
} else {
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 21, 3:50 AM (10 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25749563
Default Alt Text
D28106.diff (1 KB)
Attached To
Mode
D28106: Remove redundant rtinit() calls from tuntap.
Attached
Detach File
Event Timeline
Log In to Comment