Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141938465
D34085.id102060.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
D34085.id102060.diff
View Options
Index: sys/netinet/tcp_ratelimit.c
===================================================================
--- sys/netinet/tcp_ratelimit.c
+++ sys/netinet/tcp_ratelimit.c
@@ -1403,18 +1403,30 @@
#ifdef KERN_TLS
if (tp->t_inpcb->inp_socket->so_snd.sb_flags & SB_TLS_IFNET) {
tls = tp->t_inpcb->inp_socket->so_snd.sb_tls_info;
- MPASS(tls->mode == TCP_TLS_MODE_IFNET);
- if (tls->snd_tag != NULL &&
+ if (tls->mode != TCP_TLS_MODE_IFNET)
+ tls = NULL;
+ else if (tls->snd_tag != NULL &&
tls->snd_tag->sw->type != IF_SND_TAG_TYPE_TLS_RATE_LIMIT) {
+ if (!tls->reset_pending) {
+ /*
+ * NIC probably doesn't support
+ * ratelimit TLS tags if it didn't
+ * allocate one when an existing rate
+ * was present, so ignore.
+ */
+ tcp_rel_pacing_rate(crte, tp);
+ if (error)
+ *error = EOPNOTSUPP;
+ return (NULL);
+ }
+
/*
- * NIC probably doesn't support ratelimit TLS
- * tags if it didn't allocate one when an
- * existing rate was present, so ignore.
+ * The send tag is being converted, so set the
+ * rate limit on the inpcb tag. There is a
+ * race that the new NIC send tag might use
+ * the current rate instead of this one.
*/
- tcp_rel_pacing_rate(crte, tp);
- if (error)
- *error = EOPNOTSUPP;
- return (NULL);
+ tls = NULL;
}
}
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 14, 12:02 PM (2 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27636712
Default Alt Text
D34085.id102060.diff (1 KB)
Attached To
Mode
D34085: tcp_ratelimit: Handle some edge cases with TLS + RL send tags.
Attached
Detach File
Event Timeline
Log In to Comment