sctp_timer.c (234297) | sctp_timer.c (235360) |
---|---|
1/*- 2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. 3 * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. 4 * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are met: 8 * --- 19 unchanged lines hidden (view full) --- 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33/* $KAME: sctp_timer.c,v 1.29 2005/03/06 16:04:18 itojun Exp $ */ 34 35#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. 3 * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. 4 * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are met: 8 * --- 19 unchanged lines hidden (view full) --- 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33/* $KAME: sctp_timer.c,v 1.29 2005/03/06 16:04:18 itojun Exp $ */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/netinet/sctp_timer.c 234297 2012-04-14 21:01:44Z tuexen $"); | 36__FBSDID("$FreeBSD: head/sys/netinet/sctp_timer.c 235360 2012-05-12 20:11:35Z tuexen $"); |
37 38#define _IP_VHL 39#include <netinet/sctp_os.h> 40#include <netinet/sctp_pcb.h> 41#ifdef INET6 42#endif 43#include <netinet/sctp_var.h> 44#include <netinet/sctp_sysctl.h> --- 117 unchanged lines hidden (view full) --- 162 sizeof(uint32_t); 163 ph = mtod(oper, struct sctp_paramhdr *); 164 ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); 165 ph->param_length = htons(SCTP_BUF_LEN(oper)); 166 ippp = (uint32_t *) (ph + 1); 167 *ippp = htonl(SCTP_FROM_SCTP_TIMER + SCTP_LOC_1); 168 } 169 inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_1; | 37 38#define _IP_VHL 39#include <netinet/sctp_os.h> 40#include <netinet/sctp_pcb.h> 41#ifdef INET6 42#endif 43#include <netinet/sctp_var.h> 44#include <netinet/sctp_sysctl.h> --- 117 unchanged lines hidden (view full) --- 162 sizeof(uint32_t); 163 ph = mtod(oper, struct sctp_paramhdr *); 164 ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); 165 ph->param_length = htons(SCTP_BUF_LEN(oper)); 166 ippp = (uint32_t *) (ph + 1); 167 *ippp = htonl(SCTP_FROM_SCTP_TIMER + SCTP_LOC_1); 168 } 169 inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_1; |
170 sctp_abort_an_association(inp, stcb, SCTP_FAILED_THRESHOLD, oper, SCTP_SO_NOT_LOCKED); | 170 sctp_abort_an_association(inp, stcb, oper, SCTP_SO_NOT_LOCKED); |
171 return (1); 172 } 173 return (0); 174} 175 176/* 177 * sctp_find_alternate_net() returns a non-NULL pointer as long 178 * the argument net is non-NULL. --- 882 unchanged lines hidden (view full) --- 1061 sizeof(uint32_t); 1062 ph = mtod(oper, struct sctp_paramhdr *); 1063 ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); 1064 ph->param_length = htons(SCTP_BUF_LEN(oper)); 1065 ippp = (uint32_t *) (ph + 1); 1066 *ippp = htonl(SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); 1067 } 1068 inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_4; | 171 return (1); 172 } 173 return (0); 174} 175 176/* 177 * sctp_find_alternate_net() returns a non-NULL pointer as long 178 * the argument net is non-NULL. --- 882 unchanged lines hidden (view full) --- 1061 sizeof(uint32_t); 1062 ph = mtod(oper, struct sctp_paramhdr *); 1063 ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); 1064 ph->param_length = htons(SCTP_BUF_LEN(oper)); 1065 ippp = (uint32_t *) (ph + 1); 1066 *ippp = htonl(SCTP_FROM_SCTP_TIMER + SCTP_LOC_3); 1067 } 1068 inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_4; |
1069 sctp_abort_an_association(inp, stcb, SCTP_INTERNAL_ERROR, 1070 oper, SCTP_SO_NOT_LOCKED); | 1069 sctp_abort_an_association(inp, stcb, oper, SCTP_SO_NOT_LOCKED); |
1071 } else { 1072#ifdef INVARIANTS 1073 panic("Cookie timer expires in wrong state?"); 1074#else 1075 SCTP_PRINTF("Strange in state %d not cookie-echoed yet c-e timer expires?\n", SCTP_GET_STATE(&stcb->asoc)); 1076 return (0); 1077#endif 1078 } --- 520 unchanged lines hidden --- | 1070 } else { 1071#ifdef INVARIANTS 1072 panic("Cookie timer expires in wrong state?"); 1073#else 1074 SCTP_PRINTF("Strange in state %d not cookie-echoed yet c-e timer expires?\n", SCTP_GET_STATE(&stcb->asoc)); 1075 return (0); 1076#endif 1077 } --- 520 unchanged lines hidden --- |