mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
WireGuard 1.0.20201221
This commit is contained in:
@@ -14,13 +14,10 @@
|
||||
#ifdef RHEL_MAJOR
|
||||
#if RHEL_MAJOR == 7
|
||||
#define ISRHEL7
|
||||
#if RHEL_MINOR == 8
|
||||
#define ISCENTOS7
|
||||
#endif
|
||||
#elif RHEL_MAJOR == 8
|
||||
#define ISRHEL8
|
||||
#if RHEL_MINOR == 2
|
||||
#define ISCENTOS8
|
||||
#if RHEL_MINOR == 4
|
||||
#define ISCENTOS8S
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
@@ -94,7 +91,7 @@
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 83)
|
||||
#define ipv6_dst_lookup_flow(a, b, c, d) ipv6_dst_lookup_flow(b, c, d)
|
||||
#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 5) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) && !defined(ISUBUNTU1904)) || (!defined(ISRHEL8) && !defined(ISDEBIAN) && !defined(ISUBUNTU1804) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 119) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 181) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 224) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 224) && !defined(ISUBUNTU1604) && (!defined(ISRHEL7) || defined(ISCENTOS7)))
|
||||
#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 5) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) && !defined(ISUBUNTU1904)) || (!defined(ISRHEL8) && !defined(ISDEBIAN) && !defined(ISUBUNTU1804) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 119) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 181) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 224) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 224) && !defined(ISUBUNTU1604) && !defined(ISRHEL7))
|
||||
#define ipv6_dst_lookup_flow(a, b, c, d) ipv6_dst_lookup(a, b, &dst, c) + (void *)0 ?: dst
|
||||
#endif
|
||||
|
||||
@@ -760,7 +757,7 @@ static inline void crypto_xor_cpy(u8 *dst, const u8 *src1, const u8 *src2,
|
||||
#define hlist_add_behind(a, b) hlist_add_after(b, a)
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) && !defined(ISCENTOS8S)
|
||||
#define totalram_pages() totalram_pages
|
||||
#endif
|
||||
|
||||
@@ -1015,7 +1012,7 @@ out:
|
||||
#define COMPAT_CANNOT_USE_MAX_MTU
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 14) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 29) && !defined(ISUBUNTU1910) && !defined(ISUBUNTU1904) && (!defined(ISRHEL8) || defined(ISCENTOS8)))
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 14) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 29) && !defined(ISUBUNTU1910) && !defined(ISUBUNTU1904) && !defined(ISRHEL8))
|
||||
#include <linux/skbuff.h>
|
||||
#include <net/sch_generic.h>
|
||||
static inline void skb_reset_redirect(struct sk_buff *skb)
|
||||
|
||||
@@ -25,7 +25,7 @@ typedef enum {
|
||||
|
||||
static inline void simd_get(simd_context_t *ctx)
|
||||
{
|
||||
*ctx = !IS_ENABLED(CONFIG_PREEMPT_RT_BASE) && may_use_simd() ? HAVE_FULL_SIMD : HAVE_NO_SIMD;
|
||||
*ctx = !IS_ENABLED(CONFIG_PREEMPT_RT) && !IS_ENABLED(CONFIG_PREEMPT_RT_BASE) && may_use_simd() ? HAVE_FULL_SIMD : HAVE_NO_SIMD;
|
||||
}
|
||||
|
||||
static inline void simd_put(simd_context_t *ctx)
|
||||
|
||||
@@ -165,7 +165,7 @@ static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
} else {
|
||||
struct sk_buff *segs = skb_gso_segment(skb, 0);
|
||||
|
||||
if (unlikely(IS_ERR(segs))) {
|
||||
if (IS_ERR(segs)) {
|
||||
ret = PTR_ERR(segs);
|
||||
goto err_peer;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
PACKAGE_NAME="wireguard"
|
||||
PACKAGE_VERSION="1.0.20201112"
|
||||
PACKAGE_VERSION="1.0.20201221"
|
||||
AUTOINSTALL=yes
|
||||
|
||||
BUILT_MODULE_NAME="wireguard"
|
||||
|
||||
@@ -53,7 +53,7 @@ static int send4(struct wg_device *wg, struct sk_buff *skb,
|
||||
if (unlikely(!inet_confirm_addr(sock_net(sock), NULL, 0,
|
||||
fl.saddr, RT_SCOPE_HOST))) {
|
||||
endpoint->src4.s_addr = 0;
|
||||
*(__force __be32 *)&endpoint->src_if4 = 0;
|
||||
endpoint->src_if4 = 0;
|
||||
fl.saddr = 0;
|
||||
if (cache)
|
||||
dst_cache_reset(cache);
|
||||
@@ -63,7 +63,7 @@ static int send4(struct wg_device *wg, struct sk_buff *skb,
|
||||
PTR_ERR(rt) == -EINVAL) || (!IS_ERR(rt) &&
|
||||
rt->dst.dev->ifindex != endpoint->src_if4)))) {
|
||||
endpoint->src4.s_addr = 0;
|
||||
*(__force __be32 *)&endpoint->src_if4 = 0;
|
||||
endpoint->src_if4 = 0;
|
||||
fl.saddr = 0;
|
||||
if (cache)
|
||||
dst_cache_reset(cache);
|
||||
@@ -71,7 +71,7 @@ static int send4(struct wg_device *wg, struct sk_buff *skb,
|
||||
ip_rt_put(rt);
|
||||
rt = ip_route_output_flow(sock_net(sock), &fl, sock);
|
||||
}
|
||||
if (unlikely(IS_ERR(rt))) {
|
||||
if (IS_ERR(rt)) {
|
||||
ret = PTR_ERR(rt);
|
||||
net_dbg_ratelimited("%s: No route to %pISpfsc, error %d\n",
|
||||
wg->dev->name, &endpoint->addr, ret);
|
||||
@@ -138,7 +138,7 @@ static int send6(struct wg_device *wg, struct sk_buff *skb,
|
||||
}
|
||||
dst = ipv6_stub->ipv6_dst_lookup_flow(sock_net(sock), sock, &fl,
|
||||
NULL);
|
||||
if (unlikely(IS_ERR(dst))) {
|
||||
if (IS_ERR(dst)) {
|
||||
ret = PTR_ERR(dst);
|
||||
net_dbg_ratelimited("%s: No route to %pISpfsc, error %d\n",
|
||||
wg->dev->name, &endpoint->addr, ret);
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#ifndef WIREGUARD_VERSION
|
||||
#define WIREGUARD_VERSION "1.0.20201112"
|
||||
#define WIREGUARD_VERSION "1.0.20201221"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user