Merge pull request #578 from micmac1/osip512
[feed/telephony.git] / net / rtpengine / patches / 05-support-kernels-greater-equal-5.9.9.patch
1 commit 46a64889071cb844550786096c251b804a234016
2 Author: Richard Fuchs <rfuchs@sipwise.com>
3 Date: Thu Nov 19 11:22:26 2020 -0500
4
5 support kernels >= 5.9.9
6
7 closes #1111
8
9 Change-Id: I81f22bfec93b38a108b671b10bd70bf86fb1270c
10
11 diff --git a/kernel-module/xt_RTPENGINE.c b/kernel-module/xt_RTPENGINE.c
12 index c12edcd8..3c5e3a89 100644
13 --- a/kernel-module/xt_RTPENGINE.c
14 +++ b/kernel-module/xt_RTPENGINE.c
15 @@ -3351,7 +3351,10 @@ static int send_proxy_packet4(struct sk_buff *skb, struct re_address *src, struc
16 uh->check = CSUM_MANGLED_0;
17
18 skb->protocol = htons(ETH_P_IP);
19 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
20 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,9) || \
21 + (LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,78) && LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0))
22 + if (ip_route_me_harder(par->state->net, par->state->sk, skb, RTN_UNSPEC))
23 +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
24 if (ip_route_me_harder(par->state->net, skb, RTN_UNSPEC))
25 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
26 if (ip_route_me_harder(par->net, skb, RTN_UNSPEC))
27 @@ -3447,7 +3450,10 @@ static int send_proxy_packet6(struct sk_buff *skb, struct re_address *src, struc
28 uh->check = CSUM_MANGLED_0;
29
30 skb->protocol = htons(ETH_P_IPV6);
31 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
32 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,9) || \
33 + (LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,78) && LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0))
34 + if (ip6_route_me_harder(par->state->net, par->state->sk, skb))
35 +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
36 if (ip6_route_me_harder(par->state->net, skb))
37 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
38 if (ip6_route_me_harder(par->net, skb))