diff -ruw sys/netinet.orig/tcp_input.c sys/netinet/tcp_input.c
--- sys/netinet.orig/tcp_input.c	2004-09-19 17:38:01.000000000 +0200
+++ sys/netinet/tcp_input.c	2005-03-04 22:38:18.000000000 +0100
@@ -2902,7 +2902,8 @@
 	    (sc)->sc_rxtcur * (hz / PR_SLOWHZ), syn_cache_timer, (sc));	\
 } while (/*CONSTCOND*/0)
 
-#define	SYN_CACHE_TIMESTAMP(sc)	(tcp_now - (sc)->sc_timebase)
+#define	SYN_CACHE_TIMESTAMP(sc)	(tcp_do_asac_spoof ? tcp_asac_spoof_offset * 172800 + tcp_now : (tcp_now - (sc)->sc_timebase)) 
+//#define	SYN_CACHE_TIMESTAMP(sc)	(tcp_now - (sc)->sc_timebase)
 
 void
 syn_cache_init()
diff -ruw sys/netinet.orig/tcp_subr.c sys/netinet/tcp_subr.c
--- sys/netinet.orig/tcp_subr.c	2004-09-19 17:38:01.000000000 +0200
+++ sys/netinet/tcp_subr.c	2005-03-04 19:07:58.000000000 +0100
@@ -226,6 +226,9 @@
 void	tcp6_mtudisc __P((struct in6pcb *, int));
 #endif
 
+int	tcp_do_asac_spoof = 1;	/* asac timestamp spoof */
+int	tcp_asac_spoof_offset = 1;	/* asac timestamp spoof */
+
 struct pool tcpcb_pool;
 
 #ifdef TCP_CSUM_COUNTERS
diff -ruw sys/netinet.orig/tcp_usrreq.c sys/netinet/tcp_usrreq.c
--- sys/netinet.orig/tcp_usrreq.c	2004-05-28 09:23:55.000000000 +0200
+++ sys/netinet/tcp_usrreq.c	2005-03-04 18:59:10.000000000 +0100
@@ -1373,6 +1373,18 @@
 		       SYSCTL_DESCR("RFC1413 Identification Protocol lookups"),
 		       sysctl_net_inet_tcp_ident, 0, NULL, sizeof(uid_t),
 		       CTL_NET, pf, IPPROTO_TCP, TCPCTL_IDENT, CTL_EOL);
+	sysctl_createv(clog, 0, NULL, NULL,
+		       CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+		       CTLTYPE_INT, "asac_spoof",
+		       SYSCTL_DESCR("asac's timestamp spoof enable/disable"),
+		       NULL, 0, &tcp_do_asac_spoof, 0,
+		       CTL_NET, pf, IPPROTO_TCP, TCPCTL_ASACSPOOF, CTL_EOL);
+	sysctl_createv(clog, 0, NULL, NULL,
+		       CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+		       CTLTYPE_INT, "asac_spoof_offset",
+		       SYSCTL_DESCR("Use RFC1323 time stamp options"),
+		       NULL, 0, &tcp_asac_spoof_offset, 0,
+		       CTL_NET, pf, IPPROTO_TCP, TCPCTL_ASACSPOOF_OFFSET, CTL_EOL);
 }
 
 /*
diff -ruw sys/netinet.orig/tcp_var.h sys/netinet/tcp_var.h
--- sys/netinet.orig/tcp_var.h	2004-09-18 21:35:55.000000000 +0200
+++ sys/netinet/tcp_var.h	2005-03-04 22:48:42.000000000 +0100
@@ -362,7 +362,8 @@
 /*
  * Compute the current timestamp for a connection.
  */
-#define	TCP_TIMESTAMP(tp)	(tcp_now - (tp)->ts_timebase)
+//#define	TCP_TIMESTAMP(tp)	(tcp_now - (tp)->ts_timebase)
+#define	TCP_TIMESTAMP(tp)	( tcp_do_asac_spoof ? tcp_now + tcp_asac_spoof_offset * 172800 : tcp_now - (tp)->ts_timebase)
 
 /*
  * Handy way of passing around TCP option info.
@@ -601,6 +602,8 @@
 #define	TCPCTL_IDENT		27	/* rfc 931 identd */
 #define	TCPCTL_ACKDROPRATELIMIT	28	/* SYN/RST -> ACK rate limit */
 #define	TCPCTL_MAXID		29
+#define	TCPCTL_ASACSPOOF	30      /* asac's timestamp spoof enable/disable */
+#define	TCPCTL_ASACSPOOF_OFFSET	31      /* asac's timestamp spoof offset */
 
 #define	TCPCTL_NAMES { \
 	{ 0, 0 }, \
@@ -632,6 +635,9 @@
 	{ "init_win_local", CTLTYPE_INT }, \
 	{ "ident", CTLTYPE_STRUCT }, \
 	{ "ackdropppslimit", CTLTYPE_INT }, \
+	{ 0, 0 }, \
+	{ "asac_spoof_offset", CTLTYPE_INT }, \
+	{ "asac_spoof", CTLTYPE_INT }, \
 }
 
 #ifdef _KERNEL
@@ -654,6 +660,8 @@
 extern	int tcp_syn_cache_limit; /* max entries for compressed state engine */
 extern	int tcp_syn_bucket_limit;/* max entries per hash bucket */
 extern	int tcp_log_refused;	/* log refused connections */
+extern	int tcp_do_asac_spoof;    /* asac's timestamp spoof enabled/disabled? */
+extern	int tcp_asac_spoof_offset; /* asac's timestamp spoof absolute offset in 2 KHz units*/
 
 extern	int tcp_rst_ppslim;
 extern	int tcp_ackdrop_ppslim;
@@ -699,6 +707,8 @@
 	{ 1, 0, &tcp_delack_ticks },		\
 	{ 1, 0, &tcp_init_win_local },		\
 	{ 1, 0, &tcp_ackdrop_ppslim },		\
+	{ 1, 0, &tcp_do_asac_spoof },		\
+	{ 1, 0, &tcp_asac_spoof_offset },		\
 }
 
 #ifdef __NO_STRICT_ALIGNMENT
