forked from runfalk/synology-wireguard
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix runfalk#130: wireguard patch added for armada38x / DSM 7.0 build
A build issue was introduced on the wiregard-linux-compat codebase. The fix has been requested for a merge on the project repository WireGuard/wireguard-linux-compat#5 Waiting it to be merged, a patch was added to this project to locally fix the problem
- Loading branch information
1 parent
5992a6b
commit c22b417
Showing
2 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
--- a/src/compat/siphash/siphash.c | ||
+++ b/src/compat/siphash/siphash.c | ||
@@ -77,11 +77,11 @@ u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key) | ||
bytemask_from_count(left))); | ||
#else | ||
switch (left) { | ||
- case 7: b |= ((u64)end[6]) << 48; fallthrough; | ||
- case 6: b |= ((u64)end[5]) << 40; fallthrough; | ||
- case 5: b |= ((u64)end[4]) << 32; fallthrough; | ||
+ case 7: b |= ((u64)end[6]) << 48; | ||
+ case 6: b |= ((u64)end[5]) << 40; | ||
+ case 5: b |= ((u64)end[4]) << 32; | ||
case 4: b |= le32_to_cpup(data); break; | ||
- case 3: b |= ((u64)end[2]) << 16; fallthrough; | ||
+ case 3: b |= ((u64)end[2]) << 16; | ||
case 2: b |= le16_to_cpup(data); break; | ||
case 1: b |= end[0]; | ||
} | ||
@@ -109,11 +109,11 @@ u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key) | ||
bytemask_from_count(left))); | ||
#else | ||
switch (left) { | ||
- case 7: b |= ((u64)end[6]) << 48; fallthrough; | ||
- case 6: b |= ((u64)end[5]) << 40; fallthrough; | ||
- case 5: b |= ((u64)end[4]) << 32; fallthrough; | ||
+ case 7: b |= ((u64)end[6]) << 48; | ||
+ case 6: b |= ((u64)end[5]) << 40; | ||
+ case 5: b |= ((u64)end[4]) << 32; | ||
case 4: b |= get_unaligned_le32(end); break; | ||
- case 3: b |= ((u64)end[2]) << 16; fallthrough; | ||
+ case 3: b |= ((u64)end[2]) << 16; | ||
case 2: b |= get_unaligned_le16(end); break; | ||
case 1: b |= end[0]; | ||
} | ||
@@ -269,11 +269,11 @@ u32 __hsiphash_aligned(const void *data, size_t len, const hsiphash_key_t *key) | ||
bytemask_from_count(left))); | ||
#else | ||
switch (left) { | ||
- case 7: b |= ((u64)end[6]) << 48; fallthrough; | ||
- case 6: b |= ((u64)end[5]) << 40; fallthrough; | ||
- case 5: b |= ((u64)end[4]) << 32; fallthrough; | ||
+ case 7: b |= ((u64)end[6]) << 48; | ||
+ case 6: b |= ((u64)end[5]) << 40; | ||
+ case 5: b |= ((u64)end[4]) << 32; | ||
case 4: b |= le32_to_cpup(data); break; | ||
- case 3: b |= ((u64)end[2]) << 16; fallthrough; | ||
+ case 3: b |= ((u64)end[2]) << 16; | ||
case 2: b |= le16_to_cpup(data); break; | ||
case 1: b |= end[0]; | ||
} | ||
@@ -301,11 +301,11 @@ u32 __hsiphash_unaligned(const void *data, size_t len, | ||
bytemask_from_count(left))); | ||
#else | ||
switch (left) { | ||
- case 7: b |= ((u64)end[6]) << 48; fallthrough; | ||
- case 6: b |= ((u64)end[5]) << 40; fallthrough; | ||
- case 5: b |= ((u64)end[4]) << 32; fallthrough; | ||
+ case 7: b |= ((u64)end[6]) << 48; | ||
+ case 6: b |= ((u64)end[5]) << 40; | ||
+ case 5: b |= ((u64)end[4]) << 32; | ||
case 4: b |= get_unaligned_le32(end); break; | ||
- case 3: b |= ((u64)end[2]) << 16; fallthrough; | ||
+ case 3: b |= ((u64)end[2]) << 16; | ||
case 2: b |= get_unaligned_le16(end); break; | ||
case 1: b |= end[0]; | ||
} | ||
@@ -426,7 +426,7 @@ u32 __hsiphash_aligned(const void *data, size_t len, const hsiphash_key_t *key) | ||
v0 ^= m; | ||
} | ||
switch (left) { | ||
- case 3: b |= ((u32)end[2]) << 16; fallthrough; | ||
+ case 3: b |= ((u32)end[2]) << 16; | ||
case 2: b |= le16_to_cpup(data); break; | ||
case 1: b |= end[0]; | ||
} | ||
@@ -448,7 +448,7 @@ u32 __hsiphash_unaligned(const void *data, size_t len, | ||
v0 ^= m; | ||
} | ||
switch (left) { | ||
- case 3: b |= ((u32)end[2]) << 16; fallthrough; | ||
+ case 3: b |= ((u32)end[2]) << 16; | ||
case 2: b |= get_unaligned_le16(end); break; | ||
case 1: b |= end[0]; | ||
} |