Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177902123
D61952.1795551184.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D61952.1795551184.diff
View Options
diff --git a/sys/net/if_geneve.c b/sys/net/if_geneve.c
--- a/sys/net/if_geneve.c
+++ b/sys/net/if_geneve.c
@@ -2586,6 +2586,7 @@
*/
memset(&route, 0, sizeof(route));
ro = &route;
+ ro->ro_flags = RT_NH_NOREF;
sin = (struct sockaddr_in *)&ro->ro_dst;
sin->sin_family = AF_INET;
sin->sin_len = sizeof(*sin);
@@ -2721,6 +2722,7 @@
*/
memset(&route, 0, sizeof(route));
ro = &route;
+ ro->ro_flags = RT_NH_NOREF;
sin6 = (struct sockaddr_in6 *)&ro->ro_dst;
sin6->sin6_family = AF_INET6;
sin6->sin6_len = sizeof(*sin6);
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -2571,6 +2571,7 @@
*/
bzero(&route, sizeof(route));
ro = &route;
+ ro->ro_flags = RT_NH_NOREF;
sin = (struct sockaddr_in *)&ro->ro_dst;
sin->sin_family = AF_INET;
sin->sin_len = sizeof(*sin);
@@ -2682,6 +2683,7 @@
*/
bzero(&route, sizeof(route));
ro = &route;
+ ro->ro_flags = RT_NH_NOREF;
sin6 = (struct sockaddr_in6 *)&ro->ro_dst;
sin6->sin6_family = AF_INET6;
sin6->sin6_len = sizeof(*sin6);
diff --git a/sys/net/route.h b/sys/net/route.h
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -377,8 +377,8 @@
* referenced: it is looked up without NHR_REF and is dropped without being
* released. This is for a route on the stack that is only used in one
* network epoch section, never for a route that is cached, such as the
- * route of a PCB. Only ip_output() honors the flag when it stores a
- * nexthop; ip6_output() does not.
+ * route of a PCB. ip_output() and ip6_output() honor the flag when they
+ * store a nexthop.
*/
#define RO_NHFREE(_ro) do { \
if ((_ro)->ro_nh != NULL) { \
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -658,7 +658,9 @@
paddr = &unscoped_addr;
} else
paddr = &dst->sin6_addr;
- ro->ro_nh = fib6_lookup(fibnum, paddr, scopeid, NHR_REF, flowid);
+ ro->ro_nh = fib6_lookup(fibnum, paddr, scopeid,
+ (ro->ro_flags & RT_NH_NOREF) != 0 ? NHR_NONE : NHR_REF,
+ flowid);
}
return (ro->ro_nh);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 24, 8:13 PM (14 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41961318
Default Alt Text
D61952.1795551184.diff (2 KB)
Attached To
Mode
D61952: if_geneve: Fix nexthop reference imbalance on output
Attached
Detach File
Event Timeline