mirror of https://github.com/OpenIPC/firmware.git
49 lines
1.6 KiB
Diff
49 lines
1.6 KiB
Diff
diff -drupN a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
|
|
--- a/net/ipv4/xfrm4_policy.c 2018-08-06 17:23:04.000000000 +0300
|
|
+++ b/net/ipv4/xfrm4_policy.c 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -22,7 +22,8 @@ static struct xfrm_policy_afinfo xfrm4_p
|
|
static struct dst_entry *__xfrm4_dst_lookup(struct net *net, struct flowi4 *fl4,
|
|
int tos, int oif,
|
|
const xfrm_address_t *saddr,
|
|
- const xfrm_address_t *daddr)
|
|
+ const xfrm_address_t *daddr,
|
|
+ u32 mark)
|
|
{
|
|
struct rtable *rt;
|
|
|
|
@@ -30,6 +31,7 @@ static struct dst_entry *__xfrm4_dst_loo
|
|
fl4->daddr = daddr->a4;
|
|
fl4->flowi4_tos = tos;
|
|
fl4->flowi4_oif = l3mdev_master_ifindex_by_index(net, oif);
|
|
+ fl4->flowi4_mark = mark;
|
|
if (saddr)
|
|
fl4->saddr = saddr->a4;
|
|
|
|
@@ -44,20 +46,22 @@ static struct dst_entry *__xfrm4_dst_loo
|
|
|
|
static struct dst_entry *xfrm4_dst_lookup(struct net *net, int tos, int oif,
|
|
const xfrm_address_t *saddr,
|
|
- const xfrm_address_t *daddr)
|
|
+ const xfrm_address_t *daddr,
|
|
+ u32 mark)
|
|
{
|
|
struct flowi4 fl4;
|
|
|
|
- return __xfrm4_dst_lookup(net, &fl4, tos, oif, saddr, daddr);
|
|
+ return __xfrm4_dst_lookup(net, &fl4, tos, oif, saddr, daddr, mark);
|
|
}
|
|
|
|
static int xfrm4_get_saddr(struct net *net, int oif,
|
|
- xfrm_address_t *saddr, xfrm_address_t *daddr)
|
|
+ xfrm_address_t *saddr, xfrm_address_t *daddr,
|
|
+ u32 mark)
|
|
{
|
|
struct dst_entry *dst;
|
|
struct flowi4 fl4;
|
|
|
|
- dst = __xfrm4_dst_lookup(net, &fl4, 0, oif, NULL, daddr);
|
|
+ dst = __xfrm4_dst_lookup(net, &fl4, 0, oif, NULL, daddr, mark);
|
|
if (IS_ERR(dst))
|
|
return -EHOSTUNREACH;
|
|
|