From 526b3fa7d79f91b4c14cf82e7a773fa40fe9a47b Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 11 Oct 2017 00:32:45 +0200 Subject: socket: set skb->mark in addition to flowi Otherwise netfilter's ip_route_me_harder doesn't know how to reroute this and we get a nasty loop. --- src/socket.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/socket.c') diff --git a/src/socket.c b/src/socket.c index 6139ef5..e3fd053 100644 --- a/src/socket.c +++ b/src/socket.c @@ -30,6 +30,7 @@ static inline int send4(struct wireguard_device *wg, struct sk_buff *skb, struct skb->next = skb->prev = NULL; skb->dev = wg->dev; + skb->mark = wg->fwmark; rcu_read_lock_bh(); sock = rcu_dereference_bh(wg->sock4); @@ -100,6 +101,7 @@ static inline int send6(struct wireguard_device *wg, struct sk_buff *skb, struct skb->next = skb->prev = NULL; skb->dev = wg->dev; + skb->mark = wg->fwmark; rcu_read_lock_bh(); sock = rcu_dereference_bh(wg->sock6); -- cgit v1.2.3-59-g8ed1b