tcp_subr.c (119245) | tcp_subr.c (119995) |
---|---|
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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 | 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 |
34 * $FreeBSD: head/sys/netinet/tcp_subr.c 119245 2003-08-21 18:39:16Z rwatson $ | 34 * $FreeBSD: head/sys/netinet/tcp_subr.c 119995 2003-09-11 21:40:21Z ru $ |
35 */ 36 37#include "opt_compat.h" 38#include "opt_inet6.h" 39#include "opt_ipsec.h" 40#include "opt_mac.h" 41#include "opt_tcpdebug.h" 42 --- 1090 unchanged lines hidden (view full) --- 1133 notify = tcp_drop_syn_sent; 1134 else if (cmd == PRC_MSGSIZE) 1135 notify = tcp_mtudisc; 1136 else if (PRC_IS_REDIRECT(cmd)) { 1137 ip = 0; 1138 notify = in_rtchange; 1139 } else if (cmd == PRC_HOSTDEAD) 1140 ip = 0; | 35 */ 36 37#include "opt_compat.h" 38#include "opt_inet6.h" 39#include "opt_ipsec.h" 40#include "opt_mac.h" 41#include "opt_tcpdebug.h" 42 --- 1090 unchanged lines hidden (view full) --- 1133 notify = tcp_drop_syn_sent; 1134 else if (cmd == PRC_MSGSIZE) 1135 notify = tcp_mtudisc; 1136 else if (PRC_IS_REDIRECT(cmd)) { 1137 ip = 0; 1138 notify = in_rtchange; 1139 } else if (cmd == PRC_HOSTDEAD) 1140 ip = 0; |
1141 else if ((unsigned)cmd > PRC_NCMDS || inetctlerrmap[cmd] == 0) | 1141 else if ((unsigned)cmd >= PRC_NCMDS || inetctlerrmap[cmd] == 0) |
1142 return; 1143 if (ip) { 1144 s = splnet(); 1145 th = (struct tcphdr *)((caddr_t)ip 1146 + (ip->ip_hl << 2)); 1147 INP_INFO_WLOCK(&tcbinfo); 1148 inp = in_pcblookup_hash(&tcbinfo, faddr, th->th_dport, 1149 ip->ip_src, th->th_sport, 0, NULL); --- 49 unchanged lines hidden (view full) --- 1199 sa->sa_len != sizeof(struct sockaddr_in6)) 1200 return; 1201 1202 if (cmd == PRC_QUENCH) 1203 notify = tcp_quench; 1204 else if (cmd == PRC_MSGSIZE) 1205 notify = tcp_mtudisc; 1206 else if (!PRC_IS_REDIRECT(cmd) && | 1142 return; 1143 if (ip) { 1144 s = splnet(); 1145 th = (struct tcphdr *)((caddr_t)ip 1146 + (ip->ip_hl << 2)); 1147 INP_INFO_WLOCK(&tcbinfo); 1148 inp = in_pcblookup_hash(&tcbinfo, faddr, th->th_dport, 1149 ip->ip_src, th->th_sport, 0, NULL); --- 49 unchanged lines hidden (view full) --- 1199 sa->sa_len != sizeof(struct sockaddr_in6)) 1200 return; 1201 1202 if (cmd == PRC_QUENCH) 1203 notify = tcp_quench; 1204 else if (cmd == PRC_MSGSIZE) 1205 notify = tcp_mtudisc; 1206 else if (!PRC_IS_REDIRECT(cmd) && |
1207 ((unsigned)cmd > PRC_NCMDS || inet6ctlerrmap[cmd] == 0)) | 1207 ((unsigned)cmd >= PRC_NCMDS || inet6ctlerrmap[cmd] == 0)) |
1208 return; 1209 1210 /* if the parameter is from icmp6, decode it. */ 1211 if (d != NULL) { 1212 ip6cp = (struct ip6ctlparam *)d; 1213 m = ip6cp->ip6c_m; 1214 ip6 = ip6cp->ip6c_ip6; 1215 off = ip6cp->ip6c_off; --- 740 unchanged lines hidden --- | 1208 return; 1209 1210 /* if the parameter is from icmp6, decode it. */ 1211 if (d != NULL) { 1212 ip6cp = (struct ip6ctlparam *)d; 1213 m = ip6cp->ip6c_m; 1214 ip6 = ip6cp->ip6c_ip6; 1215 off = ip6cp->ip6c_off; --- 740 unchanged lines hidden --- |