svn commit: r249021 - in user/andre/tcp-ao/sys: conf netinet

Andre Oppermann andre at FreeBSD.org
Tue Apr 2 13:42:21 UTC 2013


Author: andre
Date: Tue Apr  2 13:42:20 2013
New Revision: 249021
URL: http://svnweb.freebsd.org/changeset/base/249021

Log:
  Add CMAC and HMAC to the build, fix a couple of typos and
  comment out some TCP-AO glue for an upcoming sync from HEAD.

Modified:
  user/andre/tcp-ao/sys/conf/files
  user/andre/tcp-ao/sys/netinet/tcp_ao.c
  user/andre/tcp-ao/sys/netinet/tcp_ao.h
  user/andre/tcp-ao/sys/netinet/tcp_output.c
  user/andre/tcp-ao/sys/netinet/tcp_usrreq.c
  user/andre/tcp-ao/sys/netinet/tcp_var.h

Modified: user/andre/tcp-ao/sys/conf/files
==============================================================================
--- user/andre/tcp-ao/sys/conf/files	Tue Apr  2 12:40:01 2013	(r249020)
+++ user/andre/tcp-ao/sys/conf/files	Tue Apr  2 13:42:20 2013	(r249021)
@@ -539,6 +539,8 @@ crypto/sha1.c			optional carp | crypto |
 					 netgraph_mppc_encryption | sctp
 crypto/sha2/sha2.c		optional crypto | geom_bde | ipsec | random | \
 					 sctp | zfs
+crypto/cmac/cmac.c		optional crypto | netinet | netinet6
+crypto/hmac/hmac.c		optional crypto | netinet | netinet6
 ddb/db_access.c			optional ddb
 ddb/db_break.c			optional ddb
 ddb/db_capture.c		optional ddb

Modified: user/andre/tcp-ao/sys/netinet/tcp_ao.c
==============================================================================
--- user/andre/tcp-ao/sys/netinet/tcp_ao.c	Tue Apr  2 12:40:01 2013	(r249020)
+++ user/andre/tcp-ao/sys/netinet/tcp_ao.c	Tue Apr  2 13:42:20 2013	(r249021)
@@ -60,7 +60,7 @@ MALLOC_DEFINE(M_TCPAO, "tcp_ao", "TCP-AO
 int
 tcp_ao_ctl(struct tcpcb *tp, struct tcp_ao_sopt *tao, int tao_len)
 {
-	srtuct tcp_ao_cb *c;
+	struct tcp_ao_cb *c;
 	struct tcp_ao_peer *p;
 	struct tcp_ao_key *k;
 	int error;

Modified: user/andre/tcp-ao/sys/netinet/tcp_ao.h
==============================================================================
--- user/andre/tcp-ao/sys/netinet/tcp_ao.h	Tue Apr  2 12:40:01 2013	(r249020)
+++ user/andre/tcp-ao/sys/netinet/tcp_ao.h	Tue Apr  2 13:42:20 2013	(r249021)
@@ -124,7 +124,7 @@ struct tcp_ao_peer {
 		sockaddr_in6 sin6;
 	} tap_peer;
 	uint8_t tap_activekey;
-	SLIST_HEAD() tap_keys;
+	SLIST_HEAD(tap_key, tcp_ao_key) tap_keys;
 };
 
 struct tcp_ao_key {

Modified: user/andre/tcp-ao/sys/netinet/tcp_output.c
==============================================================================
--- user/andre/tcp-ao/sys/netinet/tcp_output.c	Tue Apr  2 12:40:01 2013	(r249020)
+++ user/andre/tcp-ao/sys/netinet/tcp_output.c	Tue Apr  2 13:42:20 2013	(r249021)
@@ -1506,6 +1506,7 @@ tcp_addoptions(struct tcpopt *to, u_char
 				 *optp++ = 0;
 			break;
 			}
+#if 0
 		case TOF_AO:
 			{
 			int siglen = tcp_ao_siglen(tp);
@@ -1526,6 +1527,7 @@ tcp_addoptions(struct tcpopt *to, u_char
 				*optp++ = 0;
 			break;
 			}
+#endif
 		case TOF_SACK:
 			{
 			int sackblks = 0;

Modified: user/andre/tcp-ao/sys/netinet/tcp_usrreq.c
==============================================================================
--- user/andre/tcp-ao/sys/netinet/tcp_usrreq.c	Tue Apr  2 12:40:01 2013	(r249020)
+++ user/andre/tcp-ao/sys/netinet/tcp_usrreq.c	Tue Apr  2 13:42:20 2013	(r249021)
@@ -1308,7 +1308,7 @@ tcp_ctloutput(struct socket *so, struct 
 	u_int	ui;
 	struct	inpcb *inp;
 	struct	tcpcb *tp;
-	void	*x;
+//	void	*x;
 	struct	tcp_info ti;
 	char buf[TCP_CA_NAME_MAX];
 	struct cc_algo *algo;
@@ -1358,6 +1358,7 @@ tcp_ctloutput(struct socket *so, struct 
 				tp->t_flags &= ~TF_SIGNATURE;
 			goto unlock_and_done;
 #endif /* TCP_SIGNATURE */
+#if 0
 		case TCP_AO:
 			INP_WUNLOCK(inp);
 			if (sopt->sopt_valsize <= sizeof(struct tcp_ao_sopt) +
@@ -1373,7 +1374,7 @@ tcp_ctloutput(struct socket *so, struct 
 			INP_WLOCK_RECHECK(inp);
 			error = tcp_ao_ctl(tp, x, sopt->sopt_valsize);
 			goto unlock_and_done;
-
+#endif
 		case TCP_NODELAY:
 		case TCP_NOOPT:
 			INP_WUNLOCK(inp);
@@ -1568,7 +1569,7 @@ unlock_and_done:
 			error = sooptcopyout(sopt, &optval, sizeof optval);
 			break;
 #endif
-		case TCO_AO:
+		case TCP_AO:
 			optval = (tp->t_flags & TF_AO) ? 1 : 0;
 			INP_WUNLOCK(inp);
 			error = sooptcopyout(sopt, &optval, sizeof optval);

Modified: user/andre/tcp-ao/sys/netinet/tcp_var.h
==============================================================================
--- user/andre/tcp-ao/sys/netinet/tcp_var.h	Tue Apr  2 12:40:01 2013	(r249020)
+++ user/andre/tcp-ao/sys/netinet/tcp_var.h	Tue Apr  2 13:42:20 2013	(r249021)
@@ -247,7 +247,7 @@ struct tcpcb {
 #define	TF_ECN_SND_ECE	0x10000000	/* ECN ECE in queue */
 #define	TF_CONGRECOVERY	0x20000000	/* congestion recovery mode */
 #define	TF_WASCRECOVERY	0x40000000	/* was in congestion recovery */
-#define	TF_AO		0x80000000	/* require TCP-AO digests (RFC5925)
+#define	TF_AO		0x80000000	/* require TCP-AO digests (RFC5925) */
 
 #define	IN_FASTRECOVERY(t_flags)	(t_flags & TF_FASTRECOVERY)
 #define	ENTER_FASTRECOVERY(t_flags)	t_flags |= TF_FASTRECOVERY
@@ -307,8 +307,8 @@ struct tcpopt {
 	u_char		*to_sacks;	/* pointer to the first SACK blocks */
 	u_char		*to_signature;	/* pointer to the MD5/AO signature */
 	u_int8_t	to_siglen;	/* length of signature */
-	u_int8_t	to_ao_keyid	/* current TCP-AO keyid */
-	u_int8_t	tp_ao_nextkeyid	/* receive next TCP-AO keyid */
+	u_int8_t	to_ao_keyid;	/* current TCP-AO keyid */
+	u_int8_t	to_ao_nextkeyid; /* receive next TCP-AO keyid */
 	u_int16_t	to_mss;		/* maximum segment size */
 	u_int8_t	to_wscale;	/* window scaling */
 	u_int8_t	to_nsacks;	/* number of SACK blocks */


More information about the svn-src-user mailing list