diff options
author | bz <bz@FreeBSD.org> | 2008-09-13 17:26:46 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2008-09-13 17:26:46 +0000 |
commit | 8a04f6ba9ad8f876af807d672eb181a6cb9e41a0 (patch) | |
tree | 8d4abe59380e08d78c928d0f500940c9c54f301c /sys/netinet/tcp_output.c | |
parent | e9c25337c1d132c95034e69c72289e27d687b77e (diff) | |
download | FreeBSD-src-8a04f6ba9ad8f876af807d672eb181a6cb9e41a0.zip FreeBSD-src-8a04f6ba9ad8f876af807d672eb181a6cb9e41a0.tar.gz |
Implement IPv6 support for TCP MD5 Signature Option (RFC 2385)
the same way it has been implemented for IPv4.
Reviewed by: bms (skimmed)
Tested by: Nick Hilliard (nick netability.ie) (with more changes)
MFC after: 2 months
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r-- | sys/netinet/tcp_output.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 75f3038..f8cf22f 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -682,11 +682,7 @@ send: } #ifdef TCP_SIGNATURE /* TCP-MD5 (RFC2385). */ -#ifdef INET6 - if (!isipv6 && (tp->t_flags & TF_SIGNATURE)) -#else if (tp->t_flags & TF_SIGNATURE) -#endif /* INET6 */ to.to_flags |= TOF_SIGNATURE; #endif /* TCP_SIGNATURE */ @@ -1004,12 +1000,9 @@ send: tp->snd_up = tp->snd_una; /* drag it along */ #ifdef TCP_SIGNATURE -#ifdef INET6 - if (!isipv6) -#endif if (tp->t_flags & TF_SIGNATURE) { int sigoff = to.to_signature - opt; - tcp_signature_compute(m, sizeof(struct ip), len, optlen, + tcp_signature_compute(m, 0, len, optlen, (u_char *)(th + 1) + sigoff, IPSEC_DIR_OUTBOUND); } #endif |