aboutsummaryrefslogtreecommitdiffstats
path: root/src/libfreeswan
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-09-04 13:46:09 +0200
committerMartin Willi <martin@strongswan.org>2009-09-04 13:46:09 +0200
commit7daf5226b74e14a6e0f1a888b0be26f3d246f9f8 (patch)
tree6436de2e84e7a677ecfb83db4bf44766cc273d9f /src/libfreeswan
parent7d1b0304467bc668b592ccd6680fd9615efbb5b2 (diff)
downloadstrongswan-7daf5226b74e14a6e0f1a888b0be26f3d246f9f8.tar.bz2
strongswan-7daf5226b74e14a6e0f1a888b0be26f3d246f9f8.tar.xz
removed trailing spaces ([[:space:]]+$)
Diffstat (limited to 'src/libfreeswan')
-rw-r--r--src/libfreeswan/addrtoa.c4
-rw-r--r--src/libfreeswan/addrtot.c8
-rw-r--r--src/libfreeswan/addrtypeof.c4
-rw-r--r--src/libfreeswan/anyaddr.c4
-rw-r--r--src/libfreeswan/atoaddr.c4
-rw-r--r--src/libfreeswan/atoasr.c4
-rw-r--r--src/libfreeswan/atosa.c4
-rw-r--r--src/libfreeswan/atosubnet.c4
-rw-r--r--src/libfreeswan/atoul.c4
-rw-r--r--src/libfreeswan/datatot.c4
-rw-r--r--src/libfreeswan/freeswan.h6
-rw-r--r--src/libfreeswan/goodmask.c6
-rw-r--r--src/libfreeswan/initaddr.c4
-rw-r--r--src/libfreeswan/initsaid.c4
-rw-r--r--src/libfreeswan/initsubnet.c4
-rw-r--r--src/libfreeswan/internal.h4
-rw-r--r--src/libfreeswan/ipsec_param.h16
-rw-r--r--src/libfreeswan/keyblobtoid.c4
-rw-r--r--src/libfreeswan/pfkey.h4
-rw-r--r--src/libfreeswan/pfkey_v2_build.c118
-rw-r--r--src/libfreeswan/pfkey_v2_debug.c6
-rw-r--r--src/libfreeswan/pfkey_v2_ext_bits.c4
-rw-r--r--src/libfreeswan/pfkey_v2_parse.c156
-rw-r--r--src/libfreeswan/pfkeyv2.h4
-rw-r--r--src/libfreeswan/portof.c4
-rw-r--r--src/libfreeswan/prng.c4
-rw-r--r--src/libfreeswan/rangetoa.c4
-rw-r--r--src/libfreeswan/rangetosubnet.c4
-rw-r--r--src/libfreeswan/sameaddr.c4
-rw-r--r--src/libfreeswan/satoa.c4
-rw-r--r--src/libfreeswan/satot.c6
-rw-r--r--src/libfreeswan/subnetof.c4
-rw-r--r--src/libfreeswan/subnettoa.c4
-rw-r--r--src/libfreeswan/subnettot.c4
-rw-r--r--src/libfreeswan/subnettypeof.c4
-rw-r--r--src/libfreeswan/ttoaddr.c10
-rw-r--r--src/libfreeswan/ttodata.c10
-rw-r--r--src/libfreeswan/ttoprotoport.c2
-rw-r--r--src/libfreeswan/ttosa.c4
-rw-r--r--src/libfreeswan/ttosubnet.c4
-rw-r--r--src/libfreeswan/ttoul.c4
-rw-r--r--src/libfreeswan/ultoa.c4
-rw-r--r--src/libfreeswan/ultot.c4
43 files changed, 236 insertions, 236 deletions
diff --git a/src/libfreeswan/addrtoa.c b/src/libfreeswan/addrtoa.c
index 7acfa5ded..e1c71da3c 100644
--- a/src/libfreeswan/addrtoa.c
+++ b/src/libfreeswan/addrtoa.c
@@ -1,12 +1,12 @@
/*
* addresses to ASCII
* Copyright (C) 1998, 1999 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/addrtot.c b/src/libfreeswan/addrtot.c
index 6efdfccca..b4b853bbb 100644
--- a/src/libfreeswan/addrtot.c
+++ b/src/libfreeswan/addrtot.c
@@ -1,12 +1,12 @@
/*
* addresses to text
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
@@ -279,11 +279,11 @@ regress()
if (n == 0 && r->output == NULL)
{} /* okay, error expected */
-
+
else if (n == 0) {
printf("`%s' atoasr failed\n", r->input);
status = 1;
-
+
} else if (r->output == NULL) {
printf("`%s' atoasr succeeded unexpectedly '%c'\n",
r->input, r->format);
diff --git a/src/libfreeswan/addrtypeof.c b/src/libfreeswan/addrtypeof.c
index f402eca70..ee3cc998f 100644
--- a/src/libfreeswan/addrtypeof.c
+++ b/src/libfreeswan/addrtypeof.c
@@ -1,12 +1,12 @@
/*
* extract parts of an ip_address
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/anyaddr.c b/src/libfreeswan/anyaddr.c
index f2eb8d07a..5b7691b7b 100644
--- a/src/libfreeswan/anyaddr.c
+++ b/src/libfreeswan/anyaddr.c
@@ -1,12 +1,12 @@
/*
* special addresses
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/atoaddr.c b/src/libfreeswan/atoaddr.c
index cbda541d3..8f1be0a84 100644
--- a/src/libfreeswan/atoaddr.c
+++ b/src/libfreeswan/atoaddr.c
@@ -1,12 +1,12 @@
/*
* conversion from ASCII forms of addresses to internal ones
* Copyright (C) 1998, 1999 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/atoasr.c b/src/libfreeswan/atoasr.c
index ef8412fe8..ad62ef46b 100644
--- a/src/libfreeswan/atoasr.c
+++ b/src/libfreeswan/atoasr.c
@@ -1,12 +1,12 @@
/*
* convert from ASCII form of address/subnet/range to binary
* Copyright (C) 1998, 1999 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/atosa.c b/src/libfreeswan/atosa.c
index aeb5742e1..7339b4c3e 100644
--- a/src/libfreeswan/atosa.c
+++ b/src/libfreeswan/atosa.c
@@ -1,12 +1,12 @@
/*
* convert from ASCII form of SA ID to binary
* Copyright (C) 1998, 1999 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/atosubnet.c b/src/libfreeswan/atosubnet.c
index a123a39da..8b2bfa17e 100644
--- a/src/libfreeswan/atosubnet.c
+++ b/src/libfreeswan/atosubnet.c
@@ -1,12 +1,12 @@
/*
* convert from ASCII form of subnet specification to binary
* Copyright (C) 1998, 1999 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/atoul.c b/src/libfreeswan/atoul.c
index 7e51de8fe..d8e1528cb 100644
--- a/src/libfreeswan/atoul.c
+++ b/src/libfreeswan/atoul.c
@@ -1,12 +1,12 @@
/*
* convert from ASCII form of unsigned long to binary
* Copyright (C) 1998, 1999 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/datatot.c b/src/libfreeswan/datatot.c
index b18d4b050..3e2aed76d 100644
--- a/src/libfreeswan/datatot.c
+++ b/src/libfreeswan/datatot.c
@@ -1,12 +1,12 @@
/*
* convert from binary data (e.g. key) to text form
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/freeswan.h b/src/libfreeswan/freeswan.h
index 77ce8f2be..342f59987 100644
--- a/src/libfreeswan/freeswan.h
+++ b/src/libfreeswan/freeswan.h
@@ -3,12 +3,12 @@
* header file for FreeS/WAN library functions
* Copyright (C) 1998, 1999, 2000 Henry Spencer.
* Copyright (C) 1999, 2000, 2001 Richard Guy Briggs
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
@@ -391,7 +391,7 @@ extern unsigned int pfkey_lib_debug; /* bits selecting what to report */
/*
* pluto and lwdnsq need to know the maximum size of the commands to,
- * and replies from lwdnsq.
+ * and replies from lwdnsq.
*/
#define LWDNSQ_CMDBUF_LEN 1024
diff --git a/src/libfreeswan/goodmask.c b/src/libfreeswan/goodmask.c
index a2d51de0c..66edae20f 100644
--- a/src/libfreeswan/goodmask.c
+++ b/src/libfreeswan/goodmask.c
@@ -1,12 +1,12 @@
/*
* minor utilities for subnet-mask manipulation
* Copyright (C) 1998, 1999 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
@@ -17,7 +17,7 @@
/*
- goodmask - is this a good (^1*0*$) subnet mask?
- * You are not expected to understand this. See Henry S. Warren Jr,
+ * You are not expected to understand this. See Henry S. Warren Jr,
* "Functions realizable with word-parallel logical and two's-complement
* addition instructions", CACM 20.6 (June 1977), p.439.
*/
diff --git a/src/libfreeswan/initaddr.c b/src/libfreeswan/initaddr.c
index c30efb812..c84006f47 100644
--- a/src/libfreeswan/initaddr.c
+++ b/src/libfreeswan/initaddr.c
@@ -1,12 +1,12 @@
/*
* initialize address structure
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/initsaid.c b/src/libfreeswan/initsaid.c
index fb8187422..4e4bc9a35 100644
--- a/src/libfreeswan/initsaid.c
+++ b/src/libfreeswan/initsaid.c
@@ -1,12 +1,12 @@
/*
* initialize SA ID structure
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/initsubnet.c b/src/libfreeswan/initsubnet.c
index 0e19098c5..27faddabc 100644
--- a/src/libfreeswan/initsubnet.c
+++ b/src/libfreeswan/initsubnet.c
@@ -1,12 +1,12 @@
/*
* initialize subnet structure
* Copyright (C) 2000, 2002 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/internal.h b/src/libfreeswan/internal.h
index fa24f7d2d..832c8a53d 100644
--- a/src/libfreeswan/internal.h
+++ b/src/libfreeswan/internal.h
@@ -1,12 +1,12 @@
/*
* internal definitions for use within the library; do not export!
* Copyright (C) 1998, 1999 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/ipsec_param.h b/src/libfreeswan/ipsec_param.h
index b0ee845a5..93426b8ee 100644
--- a/src/libfreeswan/ipsec_param.h
+++ b/src/libfreeswan/ipsec_param.h
@@ -3,19 +3,19 @@
*
* Copyright (C) 2001 Richard Guy Briggs <rgb@freeswan.org>
* and Michael Richardson <mcr@freeswan.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
- *
+ *
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
-/*
+/*
* This file provides a set of #define's which may be tuned by various
* people/configurations. It keeps all compile-time tunables in one place.
*
@@ -38,16 +38,16 @@
# define IPSEC_SA_REF_TABLE_IDX_WIDTH 16
#endif
-#ifndef IPSEC_SA_REF_MAINTABLE_IDX_WIDTH
-# define IPSEC_SA_REF_MAINTABLE_IDX_WIDTH 4
+#ifndef IPSEC_SA_REF_MAINTABLE_IDX_WIDTH
+# define IPSEC_SA_REF_MAINTABLE_IDX_WIDTH 4
#endif
-#ifndef IPSEC_SA_REF_FREELIST_NUM_ENTRIES
+#ifndef IPSEC_SA_REF_FREELIST_NUM_ENTRIES
# define IPSEC_SA_REF_FREELIST_NUM_ENTRIES 256
#endif
-#ifndef IPSEC_SA_REF_CODE
-# define IPSEC_SA_REF_CODE 1
+#ifndef IPSEC_SA_REF_CODE
+# define IPSEC_SA_REF_CODE 1
#endif
#define _IPSEC_PARAM_H_
diff --git a/src/libfreeswan/keyblobtoid.c b/src/libfreeswan/keyblobtoid.c
index 118e61391..89ab5fced 100644
--- a/src/libfreeswan/keyblobtoid.c
+++ b/src/libfreeswan/keyblobtoid.c
@@ -1,12 +1,12 @@
/*
* generate printable key IDs
* Copyright (C) 2002 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/pfkey.h b/src/libfreeswan/pfkey.h
index ba0010bc7..993678c8b 100644
--- a/src/libfreeswan/pfkey.h
+++ b/src/libfreeswan/pfkey.h
@@ -1,12 +1,12 @@
/*
* FreeS/WAN specific PF_KEY headers
* Copyright (C) 1999, 2000, 2001 Richard Guy Briggs.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
- *
+ *
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
diff --git a/src/libfreeswan/pfkey_v2_build.c b/src/libfreeswan/pfkey_v2_build.c
index ddc21040f..c0bb369cb 100644
--- a/src/libfreeswan/pfkey_v2_build.c
+++ b/src/libfreeswan/pfkey_v2_build.c
@@ -1,12 +1,12 @@
/*
* RFC2367 PF_KEYv2 Key management API message parser
* Copyright (C) 1999, 2000, 2001 Richard Guy Briggs.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
- *
+ *
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
@@ -48,7 +48,7 @@ void
pfkey_extensions_init(struct sadb_ext *extensions[SADB_EXT_MAX + 1])
{
int i;
-
+
for (i = 0; i != SADB_EXT_MAX + 1; i++) {
extensions[i] = NULL;
}
@@ -58,7 +58,7 @@ void
pfkey_extensions_free(struct sadb_ext *extensions[SADB_EXT_MAX + 1])
{
int i;
-
+
if (!extensions) {
return;
}
@@ -68,7 +68,7 @@ pfkey_extensions_free(struct sadb_ext *extensions[SADB_EXT_MAX + 1])
FREE(extensions[0]);
extensions[0] = NULL;
}
-
+
for (i = 1; i != SADB_EXT_MAX + 1; i++) {
if(extensions[i]) {
memset(extensions[i], 0, extensions[i]->sadb_ext_len * IPSEC_PFKEYv2_ALIGN);
@@ -135,7 +135,7 @@ pfkey_msg_hdr_build(struct sadb_ext** pfkey_ext,
if (satype > SADB_SATYPE_MAX) {
DEBUGGING(
"pfkey_msg_hdr_build: "
- "satype %d > max %d\n",
+ "satype %d > max %d\n",
satype, SADB_SATYPE_MAX);
SENDERR(EINVAL);
}
@@ -169,7 +169,7 @@ pfkey_msg_hdr_build(struct sadb_ext** pfkey_ext,
*pfkey_ext);
errlab:
return error;
-}
+}
int
pfkey_sa_ref_build(struct sadb_ext ** pfkey_ext,
@@ -254,7 +254,7 @@ pfkey_sa_ref_build(struct sadb_ext ** pfkey_ext,
SADB_SASTATE_DEAD);
SENDERR(EINVAL);
}
-
+
if ((IPSEC_SAREF_NULL != ref) && (ref >= (1 << IPSEC_SA_REF_TABLE_IDX_WIDTH))) {
DEBUGGING(
"pfkey_sa_build: "
@@ -264,7 +264,7 @@ pfkey_sa_ref_build(struct sadb_ext ** pfkey_ext,
IPSEC_SA_REF_TABLE_NUM_ENTRIES);
SENDERR(EINVAL);
}
-
+
pfkey_sa = (struct sadb_sa*)MALLOC(sizeof(struct sadb_sa));
*pfkey_ext = (struct sadb_ext*)pfkey_sa;
@@ -275,7 +275,7 @@ pfkey_sa_ref_build(struct sadb_ext ** pfkey_ext,
SENDERR(ENOMEM);
}
memset(pfkey_sa, 0, sizeof(struct sadb_sa));
-
+
pfkey_sa->sadb_sa_len = sizeof(*pfkey_sa) / IPSEC_PFKEYv2_ALIGN;
pfkey_sa->sadb_sa_exttype = exttype;
pfkey_sa->sadb_sa_spi = spi;
@@ -284,11 +284,11 @@ pfkey_sa_ref_build(struct sadb_ext ** pfkey_ext,
pfkey_sa->sadb_sa_auth = auth;
pfkey_sa->sadb_sa_encrypt = encrypt;
pfkey_sa->sadb_sa_flags = flags;
- pfkey_sa->sadb_x_sa_ref = ref;
+ pfkey_sa->sadb_x_sa_ref = ref;
errlab:
return error;
-}
+}
int
pfkey_sa_build(struct sadb_ext ** pfkey_ext,
@@ -377,7 +377,7 @@ pfkey_address_build(struct sadb_ext** pfkey_ext,
int saddr_len = 0;
char ipaddr_txt[ADDRTOT_BUF + 6/*extra for port number*/];
struct sadb_address *pfkey_address = (struct sadb_address *)*pfkey_ext;
-
+
DEBUGGING(
"pfkey_address_build: "
"exttype=%d proto=%d prefixlen=%d\n",
@@ -397,8 +397,8 @@ pfkey_address_build(struct sadb_ext** pfkey_ext,
"address is NULL\n");
SENDERR(EINVAL);
}
-
- switch(exttype) {
+
+ switch(exttype) {
case SADB_EXT_ADDRESS_SRC:
case SADB_EXT_ADDRESS_DST:
case SADB_EXT_ADDRESS_PROXY:
@@ -410,11 +410,11 @@ pfkey_address_build(struct sadb_ext** pfkey_ext,
case SADB_X_EXT_NAT_T_OA:
break;
default:
- DEBUGGING(
+ DEBUGGING(
"pfkey_address_build: "
- "unrecognised ext_type=%d.\n",
- exttype);
- SENDERR(EINVAL);
+ "unrecognised ext_type=%d.\n",
+ exttype);
+ SENDERR(EINVAL);
}
switch (address->sa_family) {
@@ -479,10 +479,10 @@ pfkey_address_build(struct sadb_ext** pfkey_ext,
0,
ALIGN_N(sizeof(struct sadb_address) + saddr_len,
IPSEC_PFKEYv2_ALIGN));
-
+
pfkey_address->sadb_address_len = DIVUP(sizeof(struct sadb_address) + saddr_len,
IPSEC_PFKEYv2_ALIGN);
-
+
pfkey_address->sadb_address_exttype = exttype;
pfkey_address->sadb_address_proto = proto;
pfkey_address->sadb_address_prefixlen = prefixlen;
@@ -540,7 +540,7 @@ pfkey_key_build(struct sadb_ext** pfkey_ext,
}
pfkey_key = (struct sadb_key*)
- MALLOC(sizeof(struct sadb_key) +
+ MALLOC(sizeof(struct sadb_key) +
DIVUP(key_bits, 64) * IPSEC_PFKEYv2_ALIGN);
*pfkey_ext = (struct sadb_ext*)pfkey_key;
@@ -554,7 +554,7 @@ pfkey_key_build(struct sadb_ext** pfkey_ext,
0,
sizeof(struct sadb_key) +
DIVUP(key_bits, 64) * IPSEC_PFKEYv2_ALIGN);
-
+
pfkey_key->sadb_key_len = DIVUP(sizeof(struct sadb_key) * IPSEC_PFKEYv2_ALIGN + key_bits,
64);
pfkey_key->sadb_key_exttype = exttype;
@@ -622,12 +622,12 @@ pfkey_ident_build(struct sadb_ext** pfkey_ext,
"string required to allocate size of extension.\n");
SENDERR(EINVAL);
}
-
+
#if 0
if (ident_type == SADB_IDENTTYPE_USERFQDN) {
}
#endif
-
+
pfkey_ident = (struct sadb_ident*)
MALLOC(ident_len * IPSEC_PFKEYv2_ALIGN);
*pfkey_ext = (struct sadb_ext*)pfkey_ident;
@@ -639,7 +639,7 @@ pfkey_ident_build(struct sadb_ext** pfkey_ext,
SENDERR(ENOMEM);
}
memset(pfkey_ident, 0, ident_len * IPSEC_PFKEYv2_ALIGN);
-
+
pfkey_ident->sadb_ident_len = ident_len;
pfkey_ident->sadb_ident_exttype = exttype;
pfkey_ident->sadb_ident_type = ident_type;
@@ -699,7 +699,7 @@ pfkey_sens_build(struct sadb_ext** pfkey_ext,
0,
sizeof(struct sadb_sens) +
(sens_len + integ_len) * sizeof(uint64_t));
-
+
pfkey_sens->sadb_sens_len = (sizeof(struct sadb_sens) +
(sens_len + integ_len) * sizeof(uint64_t)) / IPSEC_PFKEYv2_ALIGN;
pfkey_sens->sadb_sens_exttype = SADB_EXT_SENSITIVITY;
@@ -761,7 +761,7 @@ pfkey_prop_build(struct sadb_ext** pfkey_ext,
0,
sizeof(struct sadb_prop) +
comb_num * sizeof(struct sadb_comb));
-
+
pfkey_prop->sadb_prop_len = (sizeof(struct sadb_prop) +
comb_num * sizeof(struct sadb_comb)) / IPSEC_PFKEYv2_ALIGN;
@@ -846,7 +846,7 @@ pfkey_supported_build(struct sadb_ext** pfkey_ext,
sizeof(struct sadb_supported) +
alg_num *
sizeof(struct sadb_alg));
-
+
pfkey_supported->sadb_supported_len = (sizeof(struct sadb_supported) +
alg_num *
sizeof(struct sadb_alg)) /
@@ -860,7 +860,7 @@ pfkey_supported_build(struct sadb_ext** pfkey_ext,
pfkey_alg->sadb_alg_reserved = 0;
pfkey_alg++;
}
-
+
#if 0
DEBUGGING(
"pfkey_supported_build: "
@@ -886,7 +886,7 @@ pfkey_spirange_build(struct sadb_ext** pfkey_ext,
{
int error = 0;
struct sadb_spirange *pfkey_spirange = (struct sadb_spirange *)*pfkey_ext;
-
+
/* sanity checks... */
if (pfkey_spirange) {
DEBUGGING(
@@ -894,7 +894,7 @@ pfkey_spirange_build(struct sadb_ext** pfkey_ext,
"why is pfkey_spirange already pointing to something?\n");
SENDERR(EINVAL);
}
-
+
if (ntohl(max) < ntohl(min)) {
DEBUGGING(
"pfkey_spirange_build: "
@@ -903,7 +903,7 @@ pfkey_spirange_build(struct sadb_ext** pfkey_ext,
ntohl(max));
SENDERR(EINVAL);
}
-
+
if (ntohl(min) <= 255) {
DEBUGGING(
"pfkey_spirange_build: "
@@ -911,7 +911,7 @@ pfkey_spirange_build(struct sadb_ext** pfkey_ext,
ntohl(min));
SENDERR(EEXIST);
}
-
+
pfkey_spirange = (struct sadb_spirange*)
MALLOC(sizeof(struct sadb_spirange));
*pfkey_ext = (struct sadb_ext*)pfkey_spirange;
@@ -925,7 +925,7 @@ pfkey_spirange_build(struct sadb_ext** pfkey_ext,
memset(pfkey_spirange,
0,
sizeof(struct sadb_spirange));
-
+
pfkey_spirange->sadb_spirange_len = sizeof(struct sadb_spirange) / IPSEC_PFKEYv2_ALIGN;
pfkey_spirange->sadb_spirange_exttype = SADB_EXT_SPIRANGE;
@@ -949,7 +949,7 @@ pfkey_x_kmprivate_build(struct sadb_ext** pfkey_ext)
"why is pfkey_x_kmprivate already pointing to something?\n");
SENDERR(EINVAL);
}
-
+
pfkey_x_kmprivate->sadb_x_kmprivate_reserved = 0;
DEBUGGING(
@@ -971,7 +971,7 @@ pfkey_x_kmprivate_build(struct sadb_ext** pfkey_ext)
memset(pfkey_x_kmprivate,
0,
sizeof(struct sadb_x_kmprivate));
-
+
pfkey_x_kmprivate->sadb_x_kmprivate_len =
sizeof(struct sadb_x_kmprivate) / IPSEC_PFKEYv2_ALIGN;
@@ -998,7 +998,7 @@ pfkey_x_satype_build(struct sadb_ext** pfkey_ext,
"why is pfkey_x_satype already pointing to something?\n");
SENDERR(EINVAL);
}
-
+
if (!satype) {
DEBUGGING(
"pfkey_x_satype_build: "
@@ -1009,7 +1009,7 @@ pfkey_x_satype_build(struct sadb_ext** pfkey_ext,
if (satype > SADB_SATYPE_MAX) {
DEBUGGING(
"pfkey_x_satype_build: "
- "satype %d > max %d\n",
+ "satype %d > max %d\n",
satype, SADB_SATYPE_MAX);
SENDERR(EINVAL);
}
@@ -1028,7 +1028,7 @@ pfkey_x_satype_build(struct sadb_ext** pfkey_ext,
memset(pfkey_x_satype,
0,
sizeof(struct sadb_x_satype));
-
+
pfkey_x_satype->sadb_x_satype_len = sizeof(struct sadb_x_satype) / IPSEC_PFKEYv2_ALIGN;
pfkey_x_satype->sadb_x_satype_exttype = SADB_X_EXT_SATYPE2;
@@ -1069,7 +1069,7 @@ pfkey_x_debug_build(struct sadb_ext** pfkey_ext,
"why is pfkey_x_debug already pointing to something?\n");
SENDERR(EINVAL);
}
-
+
DEBUGGING(
"pfkey_x_debug_build: "
"tunnel=%x netlink=%x xform=%x eroute=%x spi=%x radij=%x esp=%x ah=%x rcv=%x pfkey=%x ipcomp=%x verbose=%x?\n",
@@ -1090,7 +1090,7 @@ pfkey_x_debug_build(struct sadb_ext** pfkey_ext,
0,
sizeof(struct sadb_x_debug));
#endif
-
+
pfkey_x_debug->sadb_x_debug_len = sizeof(struct sadb_x_debug) / IPSEC_PFKEYv2_ALIGN;
pfkey_x_debug->sadb_x_debug_exttype = SADB_X_EXT_DEBUG;
@@ -1132,7 +1132,7 @@ pfkey_x_nat_t_type_build(struct sadb_ext** pfkey_ext,
"why is pfkey_x_nat_t_type already pointing to something?\n");
SENDERR(EINVAL);
}
-
+
DEBUGGING(
"pfkey_x_nat_t_type_build: "
"type=%d\n", type);
@@ -1147,7 +1147,7 @@ pfkey_x_nat_t_type_build(struct sadb_ext** pfkey_ext,
"memory allocation failed\n");
SENDERR(ENOMEM);
}
-
+
pfkey_x_nat_t_type->sadb_x_nat_t_type_len = sizeof(struct sadb_x_nat_t_type) / IPSEC_PFKEYv2_ALIGN;
pfkey_x_nat_t_type->sadb_x_nat_t_type_exttype = SADB_X_EXT_NAT_T_TYPE;
pfkey_x_nat_t_type->sadb_x_nat_t_type_type = type;
@@ -1176,17 +1176,17 @@ pfkey_x_nat_t_port_build(struct sadb_ext** pfkey_ext,
"why is pfkey_x_nat_t_port already pointing to something?\n");
SENDERR(EINVAL);
}
-
- switch (exttype) {
+
+ switch (exttype) {
case SADB_X_EXT_NAT_T_SPORT:
case SADB_X_EXT_NAT_T_DPORT:
break;
default:
- DEBUGGING(
+ DEBUGGING(
"pfkey_nat_t_port_build: "
- "unrecognised ext_type=%d.\n",
- exttype);
- SENDERR(EINVAL);
+ "unrecognised ext_type=%d.\n",
+ exttype);
+ SENDERR(EINVAL);
}
DEBUGGING(
@@ -1203,7 +1203,7 @@ pfkey_x_nat_t_port_build(struct sadb_ext** pfkey_ext,
"memory allocation failed\n");
SENDERR(ENOMEM);
}
-
+
pfkey_x_nat_t_port->sadb_x_nat_t_port_len = sizeof(struct sadb_x_nat_t_port) / IPSEC_PFKEYv2_ALIGN;
pfkey_x_nat_t_port->sadb_x_nat_t_port_exttype = exttype;
pfkey_x_nat_t_port->sadb_x_nat_t_port_port = port;
@@ -1281,7 +1281,7 @@ pfkey_msg_build(struct sadb_msg **pfkey_msg, struct sadb_ext *extensions[], int
struct sadb_ext *pfkey_ext;
int extensions_seen = 0;
struct sadb_ext *extensions_check[SADB_EXT_MAX + 1];
-
+
if (!extensions[0]) {
DEBUGGING(
"pfkey_msg_build: "
@@ -1294,7 +1294,7 @@ pfkey_msg_build(struct sadb_msg **pfkey_msg, struct sadb_ext *extensions[], int
if(extensions[ext]) {
total_size += (extensions[ext])->sadb_ext_len;
}
- }
+ }
if (!(*pfkey_msg = (struct sadb_msg*)MALLOC(total_size * IPSEC_PFKEYv2_ALIGN))) {
DEBUGGING(
@@ -1320,14 +1320,14 @@ pfkey_msg_build(struct sadb_msg **pfkey_msg, struct sadb_ext *extensions[], int
for (ext = 1; ext <= SADB_EXT_MAX; ext++) {
/* copy from extension[ext] to buffer */
- if (extensions[ext]) {
+ if (extensions[ext]) {
/* Is this type of extension permitted for this type of message? */
if (!(extensions_bitmaps[dir][EXT_BITS_PERM][(*pfkey_msg)->sadb_msg_type] &
1<<ext)) {
DEBUGGING(
"pfkey_msg_build: "
- "ext type %d not permitted, exts_perm=%08x, 1<<type=%08x\n",
- ext,
+ "ext type %d not permitted, exts_perm=%08x, 1<<type=%08x\n",
+ ext,
extensions_bitmaps[dir][EXT_BITS_PERM][(*pfkey_msg)->sadb_msg_type],
1<<ext);
SENDERR(EINVAL);
@@ -1342,7 +1342,7 @@ pfkey_msg_build(struct sadb_msg **pfkey_msg, struct sadb_ext *extensions[], int
memcpy(pfkey_ext,
extensions[ext],
(extensions[ext])->sadb_ext_len * IPSEC_PFKEYv2_ALIGN);
- {
+ {
char *pfkey_ext_c = (char *)pfkey_ext;
pfkey_ext_c += (extensions[ext])->sadb_ext_len * IPSEC_PFKEYv2_ALIGN;
@@ -1360,7 +1360,7 @@ pfkey_msg_build(struct sadb_msg **pfkey_msg, struct sadb_ext *extensions[], int
extensions_bitmaps[dir][EXT_BITS_PERM][(*pfkey_msg)->sadb_msg_type],
extensions_seen,
extensions_bitmaps[dir][EXT_BITS_REQ][(*pfkey_msg)->sadb_msg_type]);
-
+
if ((extensions_seen &
extensions_bitmaps[dir][EXT_BITS_REQ][(*pfkey_msg)->sadb_msg_type]) !=
extensions_bitmaps[dir][EXT_BITS_REQ][(*pfkey_msg)->sadb_msg_type]) {
@@ -1372,7 +1372,7 @@ pfkey_msg_build(struct sadb_msg **pfkey_msg, struct sadb_ext *extensions[], int
extensions_bitmaps[dir][EXT_BITS_REQ][(*pfkey_msg)->sadb_msg_type]) );
SENDERR(EINVAL);
}
-
+
error = pfkey_msg_parse(*pfkey_msg, NULL, extensions_check, dir);
if (error) {
DEBUGGING(
diff --git a/src/libfreeswan/pfkey_v2_debug.c b/src/libfreeswan/pfkey_v2_debug.c
index 0256e2a03..0217538a0 100644
--- a/src/libfreeswan/pfkey_v2_debug.c
+++ b/src/libfreeswan/pfkey_v2_debug.c
@@ -3,12 +3,12 @@
*
* Copyright (C) 2001 Richard Guy Briggs <rgb@freeswan.org>
* and Michael Richardson <mcr@freeswan.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
- *
+ *
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
@@ -22,7 +22,7 @@
#include "pfkeyv2.h"
#include "pfkey.h"
-/*
+/*
* This file provides ASCII translations of PF_KEY magic numbers.
*
*/
diff --git a/src/libfreeswan/pfkey_v2_ext_bits.c b/src/libfreeswan/pfkey_v2_ext_bits.c
index b6ef4496d..49b4aa567 100644
--- a/src/libfreeswan/pfkey_v2_ext_bits.c
+++ b/src/libfreeswan/pfkey_v2_ext_bits.c
@@ -1,12 +1,12 @@
/*
* RFC2367 PF_KEYv2 Key management API message parser
* Copyright (C) 1999, 2000, 2001 Richard Guy Briggs.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
- *
+ *
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
diff --git a/src/libfreeswan/pfkey_v2_parse.c b/src/libfreeswan/pfkey_v2_parse.c
index 7ee08978c..49d5cdf4a 100644
--- a/src/libfreeswan/pfkey_v2_parse.c
+++ b/src/libfreeswan/pfkey_v2_parse.c
@@ -1,12 +1,12 @@
/*
* RFC2367 PF_KEYv2 Key management API message parser
* Copyright (C) 1999, 2000, 2001 Richard Guy Briggs.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
- *
+ *
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
@@ -107,7 +107,7 @@ pfkey_sa_parse(struct sadb_ext *pfkey_ext)
#if 0
struct sadb_sa sav2;
#endif
-
+
DEBUGGING(PF_KEY_DEBUG_PARSE_FLOW,
"pfkey_sa_parse: entry\n");
/* sanity checks... */
@@ -117,7 +117,7 @@ pfkey_sa_parse(struct sadb_ext *pfkey_ext)
"NULL pointer passed in.\n");
SENDERR(EINVAL);
}
-
+
#if 0
/* check if this structure is short, and if so, fix it up.
* XXX this is NOT the way to do things.
@@ -129,7 +129,7 @@ pfkey_sa_parse(struct sadb_ext *pfkey_ext)
memcpy(&sav2, pfkey_sa, sizeof(struct sadb_sa_v1));
sav2.sadb_x_sa_ref=-1;
sav2.sadb_sa_len = sizeof(struct sadb_sa) / IPSEC_PFKEYv2_ALIGN;
-
+
pfkey_sa = &sav2;
}
#endif
@@ -143,7 +143,7 @@ pfkey_sa_parse(struct sadb_ext *pfkey_ext)
(int)sizeof(struct sadb_sa));
SENDERR(EINVAL);
}
-
+
if(pfkey_sa->sadb_sa_encrypt > SADB_EALG_MAX) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_sa_parse: "
@@ -152,7 +152,7 @@ pfkey_sa_parse(struct sadb_ext *pfkey_ext)
SADB_EALG_MAX);
SENDERR(EINVAL);
}
-
+
if(pfkey_sa->sadb_sa_auth > SADB_AALG_MAX) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_sa_parse: "
@@ -161,7 +161,7 @@ pfkey_sa_parse(struct sadb_ext *pfkey_ext)
SADB_AALG_MAX);
SENDERR(EINVAL);
}
-
+
if(pfkey_sa->sadb_sa_state > SADB_SASTATE_MAX) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_sa_parse: "
@@ -170,7 +170,7 @@ pfkey_sa_parse(struct sadb_ext *pfkey_ext)
SADB_SASTATE_MAX);
SENDERR(EINVAL);
}
-
+
if(pfkey_sa->sadb_sa_state == SADB_SASTATE_DEAD) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_sa_parse: "
@@ -179,7 +179,7 @@ pfkey_sa_parse(struct sadb_ext *pfkey_ext)
SADB_SASTATE_DEAD);
SENDERR(EINVAL);
}
-
+
if(pfkey_sa->sadb_sa_replay > 64) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_sa_parse: "
@@ -187,7 +187,7 @@ pfkey_sa_parse(struct sadb_ext *pfkey_ext)
pfkey_sa->sadb_sa_replay);
SENDERR(EINVAL);
}
-
+
if(! ((pfkey_sa->sadb_sa_exttype == SADB_EXT_SA) ||
(pfkey_sa->sadb_sa_exttype == SADB_X_EXT_SA2)))
{
@@ -209,7 +209,7 @@ pfkey_sa_parse(struct sadb_ext *pfkey_ext)
IPSEC_SA_REF_TABLE_NUM_ENTRIES);
SENDERR(EINVAL);
}
-
+
DEBUGGING(PF_KEY_DEBUG_PARSE_STRUCT,
"pfkey_sa_parse: "
"successfully found len=%d exttype=%d(%s) spi=%08lx replay=%d state=%d auth=%d encrypt=%d flags=%d ref=%d.\n",
@@ -223,10 +223,10 @@ pfkey_sa_parse(struct sadb_ext *pfkey_ext)
pfkey_sa->sadb_sa_encrypt,
pfkey_sa->sadb_sa_flags,
pfkey_sa->sadb_x_sa_ref);
-
+
errlab:
return error;
-}
+}
DEBUG_NO_STATIC int
pfkey_lifetime_parse(struct sadb_ext *pfkey_ext)
@@ -259,21 +259,21 @@ pfkey_lifetime_parse(struct sadb_ext *pfkey_ext)
(pfkey_lifetime->sadb_lifetime_exttype != SADB_EXT_LIFETIME_CURRENT)) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_lifetime_parse: "
- "unexpected ext_type=%d.\n",
- pfkey_lifetime->sadb_lifetime_exttype);
+ "unexpected ext_type=%d.\n",
+ pfkey_lifetime->sadb_lifetime_exttype);
SENDERR(EINVAL);
}
DEBUGGING(PF_KEY_DEBUG_PARSE_STRUCT,
"pfkey_lifetime_parse: "
- "life_type=%d(%s) alloc=%u bytes=%u add=%u use=%u pkts=%u.\n",
+ "life_type=%d(%s) alloc=%u bytes=%u add=%u use=%u pkts=%u.\n",
pfkey_lifetime->sadb_lifetime_exttype,
pfkey_v2_sadb_ext_string(pfkey_lifetime->sadb_lifetime_exttype),
pfkey_lifetime->sadb_lifetime_allocations,
(unsigned)pfkey_lifetime->sadb_lifetime_bytes,
(unsigned)pfkey_lifetime->sadb_lifetime_addtime,
(unsigned)pfkey_lifetime->sadb_lifetime_usetime,
- pfkey_lifetime->sadb_x_lifetime_packets);
+ pfkey_lifetime->sadb_x_lifetime_packets);
errlab:
return error;
}
@@ -286,7 +286,7 @@ pfkey_address_parse(struct sadb_ext *pfkey_ext)
struct sadb_address *pfkey_address = (struct sadb_address *)pfkey_ext;
struct sockaddr* s = (struct sockaddr*)((char*)pfkey_address + sizeof(*pfkey_address));
char ipaddr_txt[ADDRTOT_BUF];
-
+
DEBUGGING(PF_KEY_DEBUG_PARSE_FLOW,
"pfkey_address_parse:enter\n");
/* sanity checks... */
@@ -296,7 +296,7 @@ pfkey_address_parse(struct sadb_ext *pfkey_ext)
"NULL pointer passed in.\n");
SENDERR(EINVAL);
}
-
+
if(pfkey_address->sadb_address_len <
(sizeof(struct sadb_address) + sizeof(struct sockaddr))/
IPSEC_PFKEYv2_ALIGN) {
@@ -308,7 +308,7 @@ pfkey_address_parse(struct sadb_ext *pfkey_ext)
(int)sizeof(struct sockaddr));
SENDERR(EINVAL);
}
-
+
if(pfkey_address->sadb_address_reserved) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_address_parse: "
@@ -316,8 +316,8 @@ pfkey_address_parse(struct sadb_ext *pfkey_ext)
pfkey_address->sadb_address_reserved);
SENDERR(EINVAL);
}
-
- switch(pfkey_address->sadb_address_exttype) {
+
+ switch(pfkey_address->sadb_address_exttype) {
case SADB_EXT_ADDRESS_SRC:
case SADB_EXT_ADDRESS_DST:
case SADB_EXT_ADDRESS_PROXY:
@@ -329,7 +329,7 @@ pfkey_address_parse(struct sadb_ext *pfkey_ext)
case SADB_X_EXT_NAT_T_OA:
break;
default:
- DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
+ DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_address_parse: "
"unexpected ext_type=%d.\n",
pfkey_address->sadb_address_exttype);
@@ -382,7 +382,7 @@ pfkey_address_parse(struct sadb_ext *pfkey_ext)
s->sa_family);
SENDERR(EPFNOSUPPORT);
}
-
+
if(pfkey_address->sadb_address_len !=
DIVUP(sizeof(struct sadb_address) + saddr_len, IPSEC_PFKEYv2_ALIGN)) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
@@ -393,16 +393,16 @@ pfkey_address_parse(struct sadb_ext *pfkey_ext)
saddr_len);
SENDERR(EINVAL);
}
-
+
if(pfkey_address->sadb_address_prefixlen != 0) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_address_parse: "
"address prefixes not supported yet.\n");
SENDERR(EAFNOSUPPORT); /* not supported yet */
}
-
+
/* XXX check if port!=0 */
-
+
DEBUGGING(PF_KEY_DEBUG_PARSE_FLOW,
"pfkey_address_parse: successful.\n");
errlab:
@@ -452,7 +452,7 @@ pfkey_key_parse(struct sadb_ext *pfkey_ext)
pfkey_key->sadb_key_len);
SENDERR(EINVAL);
}
-
+
if(pfkey_key->sadb_key_reserved) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_key_parse: "
@@ -527,7 +527,7 @@ pfkey_ident_parse(struct sadb_ext *pfkey_ext)
SENDERR(EINVAL);
}
}
-
+
if( ! ((pfkey_ident->sadb_ident_exttype == SADB_EXT_IDENTITY_SRC) ||
(pfkey_ident->sadb_ident_exttype == SADB_EXT_IDENTITY_DST))) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
@@ -578,7 +578,7 @@ pfkey_prop_parse(struct sadb_ext *pfkey_ext)
struct sadb_comb *pfkey_comb = (struct sadb_comb *)((char*)pfkey_ext + sizeof(struct sadb_prop));
/* sanity checks... */
- if((pfkey_prop->sadb_prop_len < sizeof(struct sadb_prop) / IPSEC_PFKEYv2_ALIGN) ||
+ if((pfkey_prop->sadb_prop_len < sizeof(struct sadb_prop) / IPSEC_PFKEYv2_ALIGN) ||
(((pfkey_prop->sadb_prop_len * IPSEC_PFKEYv2_ALIGN) - sizeof(struct sadb_prop)) % sizeof(struct sadb_comb))) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_prop_parse: "
@@ -596,7 +596,7 @@ pfkey_prop_parse(struct sadb_ext *pfkey_ext)
pfkey_prop->sadb_prop_replay);
SENDERR(EINVAL);
}
-
+
for(i=0; i<3; i++) {
if(pfkey_prop->sadb_prop_reserved[i]) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
@@ -869,7 +869,7 @@ pfkey_supported_parse(struct sadb_ext *pfkey_ext)
}
pfkey_alg++;
}
-
+
errlab:
return error;
}
@@ -879,7 +879,7 @@ pfkey_spirange_parse(struct sadb_ext *pfkey_ext)
{
int error = 0;
struct sadb_spirange *pfkey_spirange = (struct sadb_spirange *)pfkey_ext;
-
+
/* sanity checks... */
if(pfkey_spirange->sadb_spirange_len !=
sizeof(struct sadb_spirange) / IPSEC_PFKEYv2_ALIGN) {
@@ -890,7 +890,7 @@ pfkey_spirange_parse(struct sadb_ext *pfkey_ext)
(int)sizeof(struct sadb_spirange));
SENDERR(EINVAL);
}
-
+
if(pfkey_spirange->sadb_spirange_reserved) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_spirange_parse: "
@@ -898,7 +898,7 @@ pfkey_spirange_parse(struct sadb_ext *pfkey_ext)
pfkey_spirange->sadb_spirange_reserved);
SENDERR(EINVAL);
}
-
+
if(ntohl(pfkey_spirange->sadb_spirange_max) < ntohl(pfkey_spirange->sadb_spirange_min)) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_spirange_parse: "
@@ -907,7 +907,7 @@ pfkey_spirange_parse(struct sadb_ext *pfkey_ext)
ntohl(pfkey_spirange->sadb_spirange_max));
SENDERR(EINVAL);
}
-
+
if(ntohl(pfkey_spirange->sadb_spirange_min) <= 255) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_spirange_parse: "
@@ -915,7 +915,7 @@ pfkey_spirange_parse(struct sadb_ext *pfkey_ext)
ntohl(pfkey_spirange->sadb_spirange_min));
SENDERR(EEXIST);
}
-
+
DEBUGGING(PF_KEY_DEBUG_PARSE_STRUCT,
"pfkey_spirange_parse: "
"ext_len=%u ext_type=%u(%s) min=%u max=%u res=%u.\n",
@@ -983,7 +983,7 @@ pfkey_x_satype_parse(struct sadb_ext *pfkey_ext)
(int)sizeof(struct sadb_x_satype));
SENDERR(EINVAL);
}
-
+
if(!pfkey_x_satype->sadb_x_satype_satype) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_x_satype_parse: "
@@ -994,7 +994,7 @@ pfkey_x_satype_parse(struct sadb_ext *pfkey_ext)
if(pfkey_x_satype->sadb_x_satype_satype > SADB_SATYPE_MAX) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_x_satype_parse: "
- "satype %d > max %d, invalid.\n",
+ "satype %d > max %d, invalid.\n",
pfkey_x_satype->sadb_x_satype_satype, SADB_SATYPE_MAX);
SENDERR(EINVAL);
}
@@ -1016,7 +1016,7 @@ pfkey_x_satype_parse(struct sadb_ext *pfkey_ext)
SENDERR(EINVAL);
}
}
-
+
DEBUGGING(PF_KEY_DEBUG_PARSE_STRUCT,
"pfkey_x_satype_parse: "
"len=%u ext=%u(%s) satype=%u(%s) res=%u,%u,%u.\n",
@@ -1051,7 +1051,7 @@ pfkey_x_ext_debug_parse(struct sadb_ext *pfkey_ext)
(int)sizeof(struct sadb_x_debug));
SENDERR(EINVAL);
}
-
+
for(i = 0; i < 4; i++) {
if(pfkey_x_debug->sadb_x_debug_reserved[i]) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
@@ -1061,7 +1061,7 @@ pfkey_x_ext_debug_parse(struct sadb_ext *pfkey_ext)
SENDERR(EINVAL);
}
}
-
+
errlab:
return error;
}
@@ -1071,17 +1071,17 @@ pfkey_x_ext_protocol_parse(struct sadb_ext *pfkey_ext)
{
int error = 0;
struct sadb_protocol *p = (struct sadb_protocol *)pfkey_ext;
-
+
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM, "pfkey_x_protocol_parse:\n");
/* sanity checks... */
-
+
if (p->sadb_protocol_len != sizeof(*p)/IPSEC_PFKEYv2_ALIGN) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_x_protocol_parse: size wrong ext_len=%d, key_ext_len=%d.\n",
p->sadb_protocol_len, (int)sizeof(*p));
SENDERR(EINVAL);
}
-
+
if (p->sadb_protocol_reserved2 != 0) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_protocol_parse: res=%d, must be zero.\n",
@@ -1168,10 +1168,10 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
int remain;
struct sadb_ext *pfkey_ext;
int extensions_seen = 0;
-
+
DEBUGGING(PF_KEY_DEBUG_PARSE_STRUCT,
"pfkey_msg_parse: "
- "parsing message ver=%d, type=%d(%s), errno=%d, satype=%d(%s), len=%d, res=%d, seq=%d, pid=%d.\n",
+ "parsing message ver=%d, type=%d(%s), errno=%d, satype=%d(%s), len=%d, res=%d, seq=%d, pid=%d.\n",
pfkey_msg->sadb_msg_version,
pfkey_msg->sadb_msg_type,
pfkey_v2_sadb_type_string(pfkey_msg->sadb_msg_type),
@@ -1182,20 +1182,20 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
pfkey_msg->sadb_msg_reserved,
pfkey_msg->sadb_msg_seq,
pfkey_msg->sadb_msg_pid);
-
+
if(ext_parsers == NULL) ext_parsers = ext_default_parsers;
-
+
pfkey_extensions_init(extensions);
-
+
remain = pfkey_msg->sadb_msg_len;
remain -= sizeof(struct sadb_msg) / IPSEC_PFKEYv2_ALIGN;
-
+
pfkey_ext = (struct sadb_ext*)((char*)pfkey_msg +
sizeof(struct sadb_msg));
-
+
extensions[0] = (struct sadb_ext *) pfkey_msg;
-
-
+
+
if(pfkey_msg->sadb_msg_version != PF_KEY_V2) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_msg_parse: "
@@ -1261,7 +1261,7 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
default:
break;
}
-
+
/* errno must not be set in downward messages */
/* this is not entirely true... a response to an ACQUIRE could return an error */
if((dir == EXT_BITS_IN) && (pfkey_msg->sadb_msg_type != SADB_ACQUIRE) && pfkey_msg->sadb_msg_errno) {
@@ -1274,54 +1274,54 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
DEBUGGING(PF_KEY_DEBUG_PARSE_FLOW,
"pfkey_msg_parse: "
- "remain=%d, ext_type=%d(%s), ext_len=%d.\n",
+ "remain=%d, ext_type=%d(%s), ext_len=%d.\n",
remain,
pfkey_ext->sadb_ext_type,
pfkey_v2_sadb_ext_string(pfkey_ext->sadb_ext_type),
pfkey_ext->sadb_ext_len);
-
+
DEBUGGING(PF_KEY_DEBUG_PARSE_FLOW,
"pfkey_msg_parse: "
"extensions permitted=%08x, required=%08x.\n",
extensions_bitmaps[dir][EXT_BITS_PERM][pfkey_msg->sadb_msg_type],
extensions_bitmaps[dir][EXT_BITS_REQ][pfkey_msg->sadb_msg_type]);
-
+
extensions_seen = 1;
-
+
while( (remain * IPSEC_PFKEYv2_ALIGN) >= sizeof(struct sadb_ext) ) {
/* Is there enough message left to support another extension header? */
if(remain < pfkey_ext->sadb_ext_len) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_msg_parse: "
- "remain %d less than ext len %d.\n",
+ "remain %d less than ext len %d.\n",
remain, pfkey_ext->sadb_ext_len);
SENDERR(EINVAL);
}
-
+
DEBUGGING(PF_KEY_DEBUG_PARSE_FLOW,
"pfkey_msg_parse: "
"parsing ext type=%d(%s) remain=%d.\n",
pfkey_ext->sadb_ext_type,
pfkey_v2_sadb_ext_string(pfkey_ext->sadb_ext_type),
remain);
-
+
/* Is the extension header type valid? */
if((pfkey_ext->sadb_ext_type > SADB_EXT_MAX) || (!pfkey_ext->sadb_ext_type)) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_msg_parse: "
- "ext type %d(%s) invalid, SADB_EXT_MAX=%d.\n",
+ "ext type %d(%s) invalid, SADB_EXT_MAX=%d.\n",
pfkey_ext->sadb_ext_type,
pfkey_v2_sadb_ext_string(pfkey_ext->sadb_ext_type),
SADB_EXT_MAX);
SENDERR(EINVAL);
}
-
+
/* Have we already seen this type of extension? */
if((extensions_seen & ( 1 << pfkey_ext->sadb_ext_type )) != 0)
{
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_msg_parse: "
- "ext type %d(%s) already seen.\n",
+ "ext type %d(%s) already seen.\n",
pfkey_ext->sadb_ext_type,
pfkey_v2_sadb_ext_string(pfkey_ext->sadb_ext_type));
SENDERR(EINVAL);
@@ -1331,7 +1331,7 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
if(ext_parsers[pfkey_ext->sadb_ext_type]==NULL) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_msg_parse: "
- "ext type %d(%s) unknown, ignoring.\n",
+ "ext type %d(%s) unknown, ignoring.\n",
pfkey_ext->sadb_ext_type,
pfkey_v2_sadb_ext_string(pfkey_ext->sadb_ext_type));
goto next_ext;
@@ -1342,8 +1342,8 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
1<<pfkey_ext->sadb_ext_type)) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_msg_parse: "
- "ext type %d(%s) not permitted, exts_perm_in=%08x, 1<<type=%08x\n",
- pfkey_ext->sadb_ext_type,
+ "ext type %d(%s) not permitted, exts_perm_in=%08x, 1<<type=%08x\n",
+ pfkey_ext->sadb_ext_type,
pfkey_v2_sadb_ext_string(pfkey_ext->sadb_ext_type),
extensions_bitmaps[dir][EXT_BITS_PERM][pfkey_msg->sadb_msg_type],
1<<pfkey_ext->sadb_ext_type);
@@ -1359,7 +1359,7 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
pfkey_ext->sadb_ext_len,
pfkey_ext,
ext_parsers[pfkey_ext->sadb_ext_type]->parser_name);
-
+
/* Parse the extension */
if((error =
(*ext_parsers[pfkey_ext->sadb_ext_type]->parser)(pfkey_ext))) {
@@ -1368,7 +1368,7 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
"extension parsing for type %d(%s) failed with error %d.\n",
pfkey_ext->sadb_ext_type,
pfkey_v2_sadb_ext_string(pfkey_ext->sadb_ext_type),
- error);
+ error);
SENDERR(-error);
}
DEBUGGING(PF_KEY_DEBUG_PARSE_FLOW,
@@ -1376,12 +1376,12 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
"Extension %d(%s) parsed.\n",
pfkey_ext->sadb_ext_type,
pfkey_v2_sadb_ext_string(pfkey_ext->sadb_ext_type));
-
+
/* Mark that we have seen this extension and remember the header location */
extensions_seen |= ( 1 << pfkey_ext->sadb_ext_type );
extensions[pfkey_ext->sadb_ext_type] = pfkey_ext;
- next_ext:
+ next_ext:
/* Calculate how much message remains */
remain -= pfkey_ext->sadb_ext_len;
@@ -1396,7 +1396,7 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
if(remain) {
DEBUGGING(PF_KEY_DEBUG_PARSE_PROBLEM,
"pfkey_msg_parse: "
- "unexpected remainder of %d.\n",
+ "unexpected remainder of %d.\n",
remain);
/* why is there still something remaining? */
SENDERR(EINVAL);
@@ -1427,7 +1427,7 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
extensions_bitmaps[dir][EXT_BITS_REQ][pfkey_msg->sadb_msg_type]));
SENDERR(EINVAL);
}
-
+
if((dir == EXT_BITS_IN) && (pfkey_msg->sadb_msg_type == SADB_X_DELFLOW)
&& ((extensions_seen & SADB_X_EXT_ADDRESS_DELFLOW)
!= SADB_X_EXT_ADDRESS_DELFLOW)
@@ -1443,7 +1443,7 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
(1<<SADB_EXT_SA) - (extensions_seen & (1<<SADB_EXT_SA)));
SENDERR(EINVAL);
}
-
+
switch(pfkey_msg->sadb_msg_type) {
case SADB_ADD:
case SADB_UPDATE:
@@ -1457,7 +1457,7 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
SADB_SASTATE_MATURE);
SENDERR(EINVAL);
}
-
+
/* check AH and ESP */
switch(((struct sadb_msg*)extensions[SADB_EXT_RESERVED])->sadb_msg_satype) {
case SADB_SATYPE_AH:
@@ -1529,7 +1529,7 @@ pfkey_msg_parse(struct sadb_msg *pfkey_msg,
ntohl(((struct sadb_sa*)(extensions[SADB_EXT_SA]))->sadb_sa_spi));
SENDERR(EINVAL);
}
- default:
+ default:
break;
}
errlab:
diff --git a/src/libfreeswan/pfkeyv2.h b/src/libfreeswan/pfkeyv2.h
index 461299c78..8a30d1edb 100644
--- a/src/libfreeswan/pfkeyv2.h
+++ b/src/libfreeswan/pfkeyv2.h
@@ -182,7 +182,7 @@ struct sadb_x_satype {
uint8_t sadb_x_satype_satype;
uint8_t sadb_x_satype_reserved[3];
};
-
+
struct sadb_x_policy {
uint16_t sadb_x_policy_len;
uint16_t sadb_x_policy_exttype;
@@ -192,7 +192,7 @@ struct sadb_x_policy {
uint32_t sadb_x_policy_id;
uint32_t sadb_x_policy_reserved2;
};
-
+
struct sadb_x_debug {
uint16_t sadb_x_debug_len;
uint16_t sadb_x_debug_exttype;
diff --git a/src/libfreeswan/portof.c b/src/libfreeswan/portof.c
index 6d06473ad..c44b839f3 100644
--- a/src/libfreeswan/portof.c
+++ b/src/libfreeswan/portof.c
@@ -1,12 +1,12 @@
/*
* low-level ip_address ugliness
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/prng.c b/src/libfreeswan/prng.c
index 6cb84e484..347f13f89 100644
--- a/src/libfreeswan/prng.c
+++ b/src/libfreeswan/prng.c
@@ -2,12 +2,12 @@
* crypto-class pseudorandom number generator
* currently uses same algorithm as RC4(TM), from Schneier 2nd ed p397
* Copyright (C) 2002 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/rangetoa.c b/src/libfreeswan/rangetoa.c
index c5a7ddfda..704558248 100644
--- a/src/libfreeswan/rangetoa.c
+++ b/src/libfreeswan/rangetoa.c
@@ -1,12 +1,12 @@
/*
* convert binary form of address range to ASCII
* Copyright (C) 1998, 1999 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/rangetosubnet.c b/src/libfreeswan/rangetosubnet.c
index 0defa0739..2a989300e 100644
--- a/src/libfreeswan/rangetosubnet.c
+++ b/src/libfreeswan/rangetosubnet.c
@@ -1,12 +1,12 @@
/*
* express an address range as a subnet (if possible)
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/sameaddr.c b/src/libfreeswan/sameaddr.c
index 653b94c30..47daaa4ee 100644
--- a/src/libfreeswan/sameaddr.c
+++ b/src/libfreeswan/sameaddr.c
@@ -1,12 +1,12 @@
/*
* comparisons
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/satoa.c b/src/libfreeswan/satoa.c
index fe7fb2ea0..09a152727 100644
--- a/src/libfreeswan/satoa.c
+++ b/src/libfreeswan/satoa.c
@@ -1,12 +1,12 @@
/*
* convert from binary form of SA ID to ASCII
* Copyright (C) 1998, 1999, 2001 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/satot.c b/src/libfreeswan/satot.c
index a16d62840..e70036482 100644
--- a/src/libfreeswan/satot.c
+++ b/src/libfreeswan/satot.c
@@ -1,12 +1,12 @@
/*
* convert from binary form of SA ID to text
* Copyright (C) 2000, 2001 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
@@ -91,7 +91,7 @@ size_t dstlen;
PASSTHROUGH6NAME);
len = strlen(buf);
}
-
+
if (sa->proto == SA_INT && addrtypeof(&sa->dst) == AF_INET &&
isunspecaddr(&sa->dst)) {
switch (ntohl(sa->spi)) {
diff --git a/src/libfreeswan/subnetof.c b/src/libfreeswan/subnetof.c
index 55786a2e4..ec9b8ec7d 100644
--- a/src/libfreeswan/subnetof.c
+++ b/src/libfreeswan/subnetof.c
@@ -1,12 +1,12 @@
/*
* minor network-address manipulation utilities
* Copyright (C) 1998, 1999 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/subnettoa.c b/src/libfreeswan/subnettoa.c
index e8d98168d..694fa40da 100644
--- a/src/libfreeswan/subnettoa.c
+++ b/src/libfreeswan/subnettoa.c
@@ -1,12 +1,12 @@
/*
* convert binary form of subnet description to ASCII
* Copyright (C) 1998, 1999 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/subnettot.c b/src/libfreeswan/subnettot.c
index 03d2e1e57..64d511ba2 100644
--- a/src/libfreeswan/subnettot.c
+++ b/src/libfreeswan/subnettot.c
@@ -1,12 +1,12 @@
/*
* convert binary form of subnet description to text
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/subnettypeof.c b/src/libfreeswan/subnettypeof.c
index 9fa15a7d5..96c283c04 100644
--- a/src/libfreeswan/subnettypeof.c
+++ b/src/libfreeswan/subnettypeof.c
@@ -1,12 +1,12 @@
/*
* extract parts of an ip_subnet, and related
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/ttoaddr.c b/src/libfreeswan/ttoaddr.c
index bda2be5ed..234c9d8e7 100644
--- a/src/libfreeswan/ttoaddr.c
+++ b/src/libfreeswan/ttoaddr.c
@@ -1,12 +1,12 @@
/*
* conversion from text forms of addresses to internal ones
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
@@ -61,7 +61,7 @@ ip_address *dst;
case AF_INET6:
case 0: /* guess */
break;
-
+
default:
return "invalid address family";
}
@@ -78,7 +78,7 @@ ip_address *dst;
{
af = AF_INET6;
}
-
+
if (af != AF_INET6)
return "non-ipv6 address may not contain `:'";
return colon(src, srclen, dst);
@@ -127,7 +127,7 @@ ip_address *dst;
}
return "does not appear to be either IPv4 or IPv6 numeric address";
break;
-
+
case AF_INET6:
return colon(src, srclen, dst);
break;
diff --git a/src/libfreeswan/ttodata.c b/src/libfreeswan/ttodata.c
index b0d5e4d01..ef3717797 100644
--- a/src/libfreeswan/ttodata.c
+++ b/src/libfreeswan/ttodata.c
@@ -1,12 +1,12 @@
/*
* convert from text form of arbitrary data (e.g., keys) to binary
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
@@ -125,7 +125,7 @@ unsigned int flags;
else if (!(skipSpace && (*src == ' ' || *src == '\t')))
stage[sl++] = *src;
}
-
+
nbytes = (*decode)(stage, buf, sizeof(buf));
switch (nbytes) {
case BADCH0:
@@ -229,7 +229,7 @@ size_t dstlen; /* not large enough is a failure */
if (dstlen < 1)
return SHORT;
-
+
p = strchr(hex, *src);
if (p == NULL)
p = strchr(hex, tolower(*src));
@@ -659,7 +659,7 @@ char *pgm;
break;
}
}
-
+
if (base >= IGNORESPACE_BIAS) {
base = base - IGNORESPACE_BIAS;
check(r, buf, n, ttodatav(r->ascii, 0, base, buf, sizeof(buf), &n, NULL, 0, TTODATAV_IGNORESPACE), &status);
diff --git a/src/libfreeswan/ttoprotoport.c b/src/libfreeswan/ttoprotoport.c
index c3d033168..e75b206be 100644
--- a/src/libfreeswan/ttoprotoport.c
+++ b/src/libfreeswan/ttoprotoport.c
@@ -72,7 +72,7 @@ bool *has_port_wildcard; /* set if port is %any */
/* is there a port wildcard? */
*has_port_wildcard = (strcmp(service_name, "%any") == 0);
-
+
if (*has_port_wildcard)
{
*port = 0;
diff --git a/src/libfreeswan/ttosa.c b/src/libfreeswan/ttosa.c
index 20e01b152..9873231c0 100644
--- a/src/libfreeswan/ttosa.c
+++ b/src/libfreeswan/ttosa.c
@@ -1,12 +1,12 @@
/*
* convert from text form of SA ID to binary
* Copyright (C) 2000, 2001 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/ttosubnet.c b/src/libfreeswan/ttosubnet.c
index 36c039a96..a18a3f326 100644
--- a/src/libfreeswan/ttosubnet.c
+++ b/src/libfreeswan/ttosubnet.c
@@ -1,12 +1,12 @@
/*
* convert from text form of subnet specification to binary
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/ttoul.c b/src/libfreeswan/ttoul.c
index 853a6130c..7524789c4 100644
--- a/src/libfreeswan/ttoul.c
+++ b/src/libfreeswan/ttoul.c
@@ -1,12 +1,12 @@
/*
* convert from text form of unsigned long to binary
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/ultoa.c b/src/libfreeswan/ultoa.c
index ef45366a1..16ddd2c1e 100644
--- a/src/libfreeswan/ultoa.c
+++ b/src/libfreeswan/ultoa.c
@@ -1,12 +1,12 @@
/*
* convert unsigned long to ASCII
* Copyright (C) 1998, 1999 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
diff --git a/src/libfreeswan/ultot.c b/src/libfreeswan/ultot.c
index c4f2d7884..6685f8f7c 100644
--- a/src/libfreeswan/ultot.c
+++ b/src/libfreeswan/ultot.c
@@ -1,12 +1,12 @@
/*
* convert unsigned long to text
* Copyright (C) 2000 Henry Spencer.
- *
+ *
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Library General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/lgpl.txt>.
- *
+ *
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public