tcp_output.c (182841) | tcp_output.c (183001) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)tcp_output.c 8.4 (Berkeley) 5/24/95 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)tcp_output.c 8.4 (Berkeley) 5/24/95 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet/tcp_output.c 182841 2008-09-07 11:38:30Z bz $"); | 33__FBSDID("$FreeBSD: head/sys/netinet/tcp_output.c 183001 2008-09-13 17:26:46Z bz $"); |
34 35#include "opt_inet.h" 36#include "opt_inet6.h" 37#include "opt_ipsec.h" 38#include "opt_mac.h" 39#include "opt_tcpdebug.h" 40 41#include <sys/param.h> --- 635 unchanged lines hidden (view full) --- 677 tp->rcv_numsacks > 0) { 678 to.to_flags |= TOF_SACK; 679 to.to_nsacks = tp->rcv_numsacks; 680 to.to_sacks = (u_char *)tp->sackblks; 681 } 682 } 683#ifdef TCP_SIGNATURE 684 /* TCP-MD5 (RFC2385). */ | 34 35#include "opt_inet.h" 36#include "opt_inet6.h" 37#include "opt_ipsec.h" 38#include "opt_mac.h" 39#include "opt_tcpdebug.h" 40 41#include <sys/param.h> --- 635 unchanged lines hidden (view full) --- 677 tp->rcv_numsacks > 0) { 678 to.to_flags |= TOF_SACK; 679 to.to_nsacks = tp->rcv_numsacks; 680 to.to_sacks = (u_char *)tp->sackblks; 681 } 682 } 683#ifdef TCP_SIGNATURE 684 /* TCP-MD5 (RFC2385). */ |
685#ifdef INET6 686 if (!isipv6 && (tp->t_flags & TF_SIGNATURE)) 687#else | |
688 if (tp->t_flags & TF_SIGNATURE) | 685 if (tp->t_flags & TF_SIGNATURE) |
689#endif /* INET6 */ | |
690 to.to_flags |= TOF_SIGNATURE; 691#endif /* TCP_SIGNATURE */ 692 693 /* Processing the options. */ 694 hdrlen += optlen = tcp_addoptions(&to, opt); 695 } 696 697#ifdef INET6 --- 301 unchanged lines hidden (view full) --- 999 * If no urgent pointer to send, then we pull 1000 * the urgent pointer to the left edge of the send window 1001 * so that it doesn't drift into the send window on sequence 1002 * number wraparound. 1003 */ 1004 tp->snd_up = tp->snd_una; /* drag it along */ 1005 1006#ifdef TCP_SIGNATURE | 686 to.to_flags |= TOF_SIGNATURE; 687#endif /* TCP_SIGNATURE */ 688 689 /* Processing the options. */ 690 hdrlen += optlen = tcp_addoptions(&to, opt); 691 } 692 693#ifdef INET6 --- 301 unchanged lines hidden (view full) --- 995 * If no urgent pointer to send, then we pull 996 * the urgent pointer to the left edge of the send window 997 * so that it doesn't drift into the send window on sequence 998 * number wraparound. 999 */ 1000 tp->snd_up = tp->snd_una; /* drag it along */ 1001 1002#ifdef TCP_SIGNATURE |
1007#ifdef INET6 1008 if (!isipv6) 1009#endif | |
1010 if (tp->t_flags & TF_SIGNATURE) { 1011 int sigoff = to.to_signature - opt; | 1003 if (tp->t_flags & TF_SIGNATURE) { 1004 int sigoff = to.to_signature - opt; |
1012 tcp_signature_compute(m, sizeof(struct ip), len, optlen, | 1005 tcp_signature_compute(m, 0, len, optlen, |
1013 (u_char *)(th + 1) + sigoff, IPSEC_DIR_OUTBOUND); 1014 } 1015#endif 1016 1017 /* 1018 * Put TCP length in extended header, and then 1019 * checksum extended header and data. 1020 */ --- 442 unchanged lines hidden --- | 1006 (u_char *)(th + 1) + sigoff, IPSEC_DIR_OUTBOUND); 1007 } 1008#endif 1009 1010 /* 1011 * Put TCP length in extended header, and then 1012 * checksum extended header and data. 1013 */ --- 442 unchanged lines hidden --- |