Shorten the name of the socket option used to enable TCP-MD5 packet
treatment. Submitted by: Vincent Jardin
This commit is contained in:
parent
497ddd5807
commit
88f6b0435e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=125890
@ -121,7 +121,7 @@ supports a number of socket options which can be set with
|
||||
.Xr setsockopt 2
|
||||
and tested with
|
||||
.Xr getsockopt 2 :
|
||||
.Bl -tag -width ".Dv TCP_SIGNATURE_ENABLE"
|
||||
.Bl -tag -width ".Dv TCP_MD5SIG"
|
||||
.It Dv TCP_NODELAY
|
||||
Under most circumstances,
|
||||
.Tn TCP
|
||||
@ -175,7 +175,7 @@ When this option is set to a non-zero value,
|
||||
.Tn TCP
|
||||
will delay sending any data at all until either the socket is closed,
|
||||
or the internal send buffer is filled.
|
||||
.It Dv TCP_SIGNATURE_ENABLE
|
||||
.It Dv TCP_MD5SIG
|
||||
This option enables the use of MD5 digests (also known as TCP-MD5)
|
||||
on writes to the specified socket.
|
||||
In the current release, only outgoing traffic is digested;
|
||||
|
@ -158,7 +158,7 @@ struct tcphdr {
|
||||
#define TCP_MAXSEG 0x02 /* set maximum segment size */
|
||||
#define TCP_NOPUSH 0x04 /* don't push last block of write */
|
||||
#define TCP_NOOPT 0x08 /* don't use TCP options */
|
||||
#define TCP_SIGNATURE_ENABLE 0x10 /* use MD5 digests (RFC2385) */
|
||||
#define TCP_MD5SIG 0x10 /* use MD5 digests (RFC2385) */
|
||||
#endif
|
||||
|
||||
#endif /* !_NETINET_TCP_H_ */
|
||||
|
@ -1067,7 +1067,7 @@ tcp_ctloutput(so, sopt)
|
||||
case SOPT_SET:
|
||||
switch (sopt->sopt_name) {
|
||||
#ifdef TCP_SIGNATURE
|
||||
case TCP_SIGNATURE_ENABLE:
|
||||
case TCP_MD5SIG:
|
||||
error = sooptcopyin(sopt, &optval, sizeof optval,
|
||||
sizeof optval);
|
||||
if (error)
|
||||
@ -1140,7 +1140,7 @@ tcp_ctloutput(so, sopt)
|
||||
case SOPT_GET:
|
||||
switch (sopt->sopt_name) {
|
||||
#ifdef TCP_SIGNATURE
|
||||
case TCP_SIGNATURE_ENABLE:
|
||||
case TCP_MD5SIG:
|
||||
optval = (tp->t_flags & TF_SIGNATURE) ? 1 : 0;
|
||||
break;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user