svn commit: r353782 - head/sys/net
Kyle Evans
kevans at FreeBSD.org
Sun Oct 20 21:06:26 UTC 2019
Author: kevans
Date: Sun Oct 20 21:06:25 2019
New Revision: 353782
URL: https://svnweb.freebsd.org/changeset/base/353782
Log:
tuntap(4): break out after setting TUN_DSTADDR
This is now the only flag we set in this loop, terminate early.
Modified:
head/sys/net/if_tuntap.c
Modified: head/sys/net/if_tuntap.c
==============================================================================
--- head/sys/net/if_tuntap.c Sun Oct 20 21:03:48 2019 (r353781)
+++ head/sys/net/if_tuntap.c Sun Oct 20 21:06:25 2019 (r353782)
@@ -1193,8 +1193,10 @@ tuninit(struct ifnet *ifp)
struct sockaddr_in *si;
si = (struct sockaddr_in *)ifa->ifa_dstaddr;
- if (si && si->sin_addr.s_addr)
+ if (si && si->sin_addr.s_addr) {
tp->tun_flags |= TUN_DSTADDR;
+ break;
+ }
}
}
NET_EPOCH_EXIT(et);
More information about the svn-src-all
mailing list