Deleted Added
full compact
sctp_auth.c (228653) sctp_auth.c (228907)
1/*-
2 * Copyright (c) 2001-2008, 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 *

--- 17 unchanged lines hidden (view full) ---

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
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#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001-2008, 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 *

--- 17 unchanged lines hidden (view full) ---

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
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#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_auth.c 228653 2011-12-17 19:21:40Z tuexen $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_auth.c 228907 2011-12-27 10:16:24Z tuexen $");
35
36#include <netinet/sctp_os.h>
37#include <netinet/sctp.h>
38#include <netinet/sctp_header.h>
39#include <netinet/sctp_pcb.h>
40#include <netinet/sctp_var.h>
41#include <netinet/sctp_sysctl.h>
42#include <netinet/sctputil.h>

--- 421 unchanged lines hidden (view full) ---

464 key_ptr += shared->keylen;
465 }
466 if (sctp_get_keylen(key1)) {
467 bcopy(key1->key, key_ptr, key1->keylen);
468 key_ptr += key1->keylen;
469 }
470 if (sctp_get_keylen(key2)) {
471 bcopy(key2->key, key_ptr, key2->keylen);
35
36#include <netinet/sctp_os.h>
37#include <netinet/sctp.h>
38#include <netinet/sctp_header.h>
39#include <netinet/sctp_pcb.h>
40#include <netinet/sctp_var.h>
41#include <netinet/sctp_sysctl.h>
42#include <netinet/sctputil.h>

--- 421 unchanged lines hidden (view full) ---

464 key_ptr += shared->keylen;
465 }
466 if (sctp_get_keylen(key1)) {
467 bcopy(key1->key, key_ptr, key1->keylen);
468 key_ptr += key1->keylen;
469 }
470 if (sctp_get_keylen(key2)) {
471 bcopy(key2->key, key_ptr, key2->keylen);
472 key_ptr += key2->keylen;
473 }
474 } else {
475 /* key is shared + key2 + key1 */
476 if (sctp_get_keylen(shared)) {
477 bcopy(shared->key, key_ptr, shared->keylen);
478 key_ptr += shared->keylen;
479 }
480 if (sctp_get_keylen(key2)) {
481 bcopy(key2->key, key_ptr, key2->keylen);
482 key_ptr += key2->keylen;
483 }
484 if (sctp_get_keylen(key1)) {
485 bcopy(key1->key, key_ptr, key1->keylen);
472 }
473 } else {
474 /* key is shared + key2 + key1 */
475 if (sctp_get_keylen(shared)) {
476 bcopy(shared->key, key_ptr, shared->keylen);
477 key_ptr += shared->keylen;
478 }
479 if (sctp_get_keylen(key2)) {
480 bcopy(key2->key, key_ptr, key2->keylen);
481 key_ptr += key2->keylen;
482 }
483 if (sctp_get_keylen(key1)) {
484 bcopy(key1->key, key_ptr, key1->keylen);
486 key_ptr += key1->keylen;
487 }
488 }
489 return (new_key);
490}
491
492
493sctp_sharedkey_t *
494sctp_alloc_sharedkey(void)

--- 1635 unchanged lines hidden ---
485 }
486 }
487 return (new_key);
488}
489
490
491sctp_sharedkey_t *
492sctp_alloc_sharedkey(void)

--- 1635 unchanged lines hidden ---