From 8f03a5a22c3de97473a562a7cfe76c6fde674b0e 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. Signed-off-by: Jason A. Donenfeld --- src/socket.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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