summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2015-04-11 22:14:51 +0200
committerYves-Alexis Perez <corsac@debian.org>2015-04-11 22:30:18 +0200
commit933453fef40b406404760c992830e487619be944 (patch)
tree215c66837ab90c9ab45e6acfcb9a0345270a37b6 /debian/patches
parent6cd39beb47c9ee724ea6f69c23011bd4e84fbc42 (diff)
downloadvyos-strongswan-933453fef40b406404760c992830e487619be944.tar.gz
vyos-strongswan-933453fef40b406404760c992830e487619be944.zip
02_chunk-endianness dropped, included upstream.
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/02_chunk-endianness.patch72
-rw-r--r--debian/patches/series1
2 files changed, 0 insertions, 73 deletions
diff --git a/debian/patches/02_chunk-endianness.patch b/debian/patches/02_chunk-endianness.patch
deleted file mode 100644
index f98dfee11..000000000
--- a/debian/patches/02_chunk-endianness.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-commit 701d6ed7361c4554411f06079816784bc43d6df4
-Author: Tobias Brunner <tobias@strongswan.org>
-Date: Wed Oct 22 19:41:40 2014 +0200
-
- chunk: Fix internet checksum calculation on big-endian systems
-
- ntohs() might be defined as noop (#define ntohs(x) (x)) so we have
- to manually shorten the negated value (gets promoted to an int).
-
-diff --git a/src/libstrongswan/utils/chunk.c b/src/libstrongswan/utils/chunk.c
-index 4b24b37..c4471be 100644
---- a/src/libstrongswan/utils/chunk.c
-+++ b/src/libstrongswan/utils/chunk.c
-@@ -992,7 +992,7 @@ u_int32_t chunk_hash_static(chunk_t chunk)
- */
- u_int16_t chunk_internet_checksum_inc(chunk_t data, u_int16_t checksum)
- {
-- u_int32_t sum = ntohs(~checksum);
-+ u_int32_t sum = ntohs((u_int16_t)~checksum);
-
- while (data.len > 1)
- {
-
-commit 1c70c6ed275c7701877dbf6322721af38ada2d68
-Author: Tobias Brunner <tobias@strongswan.org>
-Date: Wed Oct 22 19:43:22 2014 +0200
-
- unit-tests: Fix internet checksum tests on big-endian systems
-
- We actually need to do a byte-swap, which ntohs() only does on
- little-endian systems.
-
-diff --git a/src/libstrongswan/tests/suites/test_chunk.c b/src/libstrongswan/tests/suites/test_chunk.c
-index d71e010..b5d2365 100644
---- a/src/libstrongswan/tests/suites/test_chunk.c
-+++ b/src/libstrongswan/tests/suites/test_chunk.c
-@@ -787,6 +787,11 @@ END_TEST
- * test for chunk_internet_checksum[_inc]()
- */
-
-+static inline u_int16_t compensate_alignment(u_int16_t val)
-+{
-+ return ((val & 0xff) << 8) | (val >> 8);
-+}
-+
- START_TEST(test_chunk_internet_checksum)
- {
- chunk_t chunk;
-@@ -804,9 +809,9 @@ START_TEST(test_chunk_internet_checksum)
-
- /* need to compensate for even/odd alignment */
- sum = chunk_internet_checksum(chunk_create(chunk.ptr, 9));
-- sum = ntohs(sum);
-+ sum = compensate_alignment(sum);
- sum = chunk_internet_checksum_inc(chunk_create(chunk.ptr+9, 11), sum);
-- sum = ntohs(sum);
-+ sum = compensate_alignment(sum);
- ck_assert_int_eq(0x442e, ntohs(sum));
-
- chunk = chunk_from_chars(0x45,0x00,0x00,0x30,0x44,0x22,0x40,0x00,0x80,0x06,
-@@ -821,9 +826,9 @@ START_TEST(test_chunk_internet_checksum)
-
- /* need to compensate for even/odd alignment */
- sum = chunk_internet_checksum(chunk_create(chunk.ptr, 9));
-- sum = ntohs(sum);
-+ sum = compensate_alignment(sum);
- sum = chunk_internet_checksum_inc(chunk_create(chunk.ptr+9, 10), sum);
-- sum = ntohs(sum);
-+ sum = compensate_alignment(sum);
- ck_assert_int_eq(0x4459, ntohs(sum));
- }
- END_TEST
diff --git a/debian/patches/series b/debian/patches/series
index e12f917f1..4601374ea 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,4 @@
01_fix-manpages.patch
-02_chunk-endianness.patch
03_systemd-service.patch
04_disable-libtls-tests.patch
CVE-2014-9221_modp_custom.patch