Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150697917
D10059.id26648.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
D10059.id26648.diff
View Options
Index: head/sys/netinet/in_pcb.c
===================================================================
--- head/sys/netinet/in_pcb.c
+++ head/sys/netinet/in_pcb.c
@@ -328,6 +328,12 @@
#endif
inp->inp_gencnt = ++pcbinfo->ipi_gencnt;
refcount_init(&inp->inp_refcount, 1); /* Reference from inpcbinfo */
+
+ /*
+ * Routes in inpcb's can cache L2 as well; they are guaranteed
+ * to be cleaned up.
+ */
+ inp->inp_route.ro_flags = RT_LLE_CACHE;
INP_LIST_WUNLOCK(pcbinfo);
#if defined(IPSEC) || defined(IPSEC_SUPPORT) || defined(MAC)
out:
Index: head/sys/netinet/ip_output.c
===================================================================
--- head/sys/netinet/ip_output.c
+++ head/sys/netinet/ip_output.c
@@ -242,8 +242,7 @@
if (ro == NULL) {
ro = &iproute;
bzero(ro, sizeof (*ro));
- } else
- ro->ro_flags |= RT_LLE_CACHE;
+ }
#ifdef FLOWTABLE
if (ro->ro_rt == NULL)
Index: head/sys/netinet6/ip6_output.c
===================================================================
--- head/sys/netinet6/ip6_output.c
+++ head/sys/netinet6/ip6_output.c
@@ -494,8 +494,7 @@
if (ro == NULL) {
ro = &ip6route;
bzero((caddr_t)ro, sizeof(*ro));
- } else
- ro->ro_flags |= RT_LLE_CACHE;
+ }
ro_pmtu = ro;
if (opt && opt->ip6po_rthdr)
ro = &opt->ip6po_route;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 10:58 AM (22 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30814933
Default Alt Text
D10059.id26648.diff (1 KB)
Attached To
Mode
D10059: Fix reference count leak with L2 caching.
Attached
Detach File
Event Timeline
Log In to Comment