Deleted Added
full compact
xform_tcp.c (194357) xform_tcp.c (195699)
1/* $FreeBSD: head/sys/netipsec/xform_tcp.c 194357 2009-06-17 12:44:11Z bz $ */
1/* $FreeBSD: head/sys/netipsec/xform_tcp.c 195699 2009-07-14 22:48:30Z rwatson $ */
2
3/*-
4 * Copyright (c) 2003 Bruce M. Simpson <bms@spc.org>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *

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

44#include <netinet/in.h>
45#include <netinet/in_systm.h>
46#include <netinet/ip.h>
47#include <netinet/ip_var.h>
48#include <netinet/tcp.h>
49#include <netinet/tcp_var.h>
50
51#include <net/route.h>
2
3/*-
4 * Copyright (c) 2003 Bruce M. Simpson <bms@spc.org>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *

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

44#include <netinet/in.h>
45#include <netinet/in_systm.h>
46#include <netinet/ip.h>
47#include <netinet/ip_var.h>
48#include <netinet/tcp.h>
49#include <netinet/tcp_var.h>
50
51#include <net/route.h>
52#include <net/vnet.h>
53
52#include <netipsec/ipsec.h>
53#include <netipsec/xform.h>
54
55#ifdef INET6
56#include <netinet/ip6.h>
57#include <netipsec/ipsec6.h>
58#endif
59

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

78 * treatment, however the code to do this is currently unstable
79 * and unsuitable for production use.
80 *
81 * Therefore we use this compromise in the meantime.
82 */
83static int
84tcpsignature_init(struct secasvar *sav, struct xformsw *xsp)
85{
54#include <netipsec/ipsec.h>
55#include <netipsec/xform.h>
56
57#ifdef INET6
58#include <netinet/ip6.h>
59#include <netipsec/ipsec6.h>
60#endif
61

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

80 * treatment, however the code to do this is currently unstable
81 * and unsuitable for production use.
82 *
83 * Therefore we use this compromise in the meantime.
84 */
85static int
86tcpsignature_init(struct secasvar *sav, struct xformsw *xsp)
87{
86 INIT_VNET_IPSEC(curvnet);
87 int keylen;
88
89 if (sav->spi != htonl(TCP_SIG_SPI)) {
90 DPRINTF(("%s: SPI must be TCP_SIG_SPI (0x1000)\n",
91 __func__));
92 return (EINVAL);
93 }
94 if (sav->alg_auth != SADB_X_AALG_TCP_MD5) {

--- 77 unchanged lines hidden ---
88 int keylen;
89
90 if (sav->spi != htonl(TCP_SIG_SPI)) {
91 DPRINTF(("%s: SPI must be TCP_SIG_SPI (0x1000)\n",
92 __func__));
93 return (EINVAL);
94 }
95 if (sav->alg_auth != SADB_X_AALG_TCP_MD5) {

--- 77 unchanged lines hidden ---