Skip to content

Commit 26bf5b0

Browse files
committed
src/timers.c and src/device.c: map del_timer[_sync] to timer_delete[_sync] on kernel >= 6.15, per linux 326534e837 and 8fa7292fee.
1 parent 987a2fe commit 26bf5b0

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/device.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
#include <net/gso.h>
3333
#endif
3434

35+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
36+
/* see linux 326534e837 and 8fa7292fee */
37+
#define del_timer timer_delete
38+
#define del_timer_sync timer_delete_sync
39+
#endif
40+
3541
static LIST_HEAD(device_list);
3642

3743
static int wg_open(struct net_device *dev)

src/queueing.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ static inline void wg_reset_packet(struct sk_buff *skb, bool encapsulating)
8181

8282
skb_scrub_packet(skb, true);
8383

84-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
84+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)) || \
85+
(defined(RHEL_RELEASE_CODE) && \
86+
(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 5)))
8587
memset(&skb->headers, 0,
8688
sizeof skb->headers);
8789
#else

src/timers.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
* specified seconds.
2727
*/
2828

29+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
30+
/* see linux 326534e837 and 8fa7292fee */
31+
#define del_timer timer_delete
32+
#define del_timer_sync timer_delete_sync
33+
#endif
34+
2935
static inline void mod_peer_timer(struct wg_peer *peer,
3036
struct timer_list *timer,
3137
unsigned long expires)

0 commit comments

Comments
 (0)