Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F158857228
D33490.id100112.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
D33490.id100112.diff
View Options
Index: sys/netinet/tcp_timewait.c
===================================================================
--- sys/netinet/tcp_timewait.c
+++ sys/netinet/tcp_timewait.c
@@ -36,6 +36,7 @@
#include "opt_inet.h"
#include "opt_inet6.h"
+#include "opt_ipsec.h"
#include "opt_tcpdebug.h"
#include <sys/param.h>
@@ -96,6 +97,9 @@
#include <netinet/udp.h>
#include <netinet/udp_var.h>
+
+#include <netipsec/ipsec_support.h>
+
#include <machine/in_cksum.h>
#include <security/mac/mac_framework.h>
@@ -328,6 +332,7 @@
tw->irs = tp->irs;
tw->t_starttime = tp->t_starttime;
tw->tw_time = 0;
+ tw->tw_flags = tp->t_flags;
/* XXX
* If this code will
@@ -669,6 +674,10 @@
to.to_tsval = tcp_ts_getticks() + tw->ts_offset;
to.to_tsecr = tw->t_recent;
}
+#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE)
+ if (tw->tw_flags & TF_SIGNATURE)
+ to.to_flags |= TOF_SIGNATURE;
+#endif
optlen = tcp_addoptions(&to, (u_char *)(th + 1));
if (udp) {
@@ -686,6 +695,13 @@
th->th_flags = flags;
th->th_win = htons(tw->last_win);
+#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE)
+ if (tw->tw_flags & TF_SIGNATURE) {
+ if (!TCPMD5_ENABLED() ||
+ TCPMD5_OUTPUT(m, th, to.to_signature) != 0)
+ return (-1);
+ }
+#endif
#ifdef INET6
if (isipv6) {
if (tw->t_port) {
Index: sys/netinet/tcp_var.h
===================================================================
--- sys/netinet/tcp_var.h
+++ sys/netinet/tcp_var.h
@@ -539,7 +539,7 @@
int tw_time;
TAILQ_ENTRY(tcptw) tw_2msl;
void *tw_pspare; /* TCP_SIGNATURE */
- u_int *tw_spare; /* TCP_SIGNATURE */
+ u_int tw_flags; /* tcpcb t_flags */
};
#define intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jun 7, 10:42 PM (5 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33803175
Default Alt Text
D33490.id100112.diff (1 KB)
Attached To
Mode
D33490: tcp_twrespond: send signed segment when connection is TCP-MD5
Attached
Detach File
Event Timeline
Log In to Comment