diff mbox series

[net] ipvlan: Add the skb->mark as flow4's member to lookup route

Message ID 1512093522-83215-1-git-send-email-gfree.wind@vip.163.com
State Accepted, archived
Delegated to: David Miller
Headers show
Series [net] ipvlan: Add the skb->mark as flow4's member to lookup route | expand

Commit Message

Gao Feng Dec. 1, 2017, 1:58 a.m. UTC
From: Gao Feng <gfree.wind@vip.163.com>

Current codes don't use skb->mark to assign flowi4_mark, it would
make the policy route rule with fwmark doesn't work as expected.

Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
---
 drivers/net/ipvlan/ipvlan_core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

David Miller Dec. 3, 2017, 2:44 p.m. UTC | #1
From: gfree.wind@vip.163.com
Date: Fri,  1 Dec 2017 09:58:42 +0800

> From: Gao Feng <gfree.wind@vip.163.com>
> 
> Current codes don't use skb->mark to assign flowi4_mark, it would
> make the policy route rule with fwmark doesn't work as expected.
> 
> Signed-off-by: Gao Feng <gfree.wind@vip.163.com>

Applied.
diff mbox series

Patch

diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c
index 11c1e79..77cc4fb 100644
--- a/drivers/net/ipvlan/ipvlan_core.c
+++ b/drivers/net/ipvlan/ipvlan_core.c
@@ -393,6 +393,7 @@  static int ipvlan_process_v4_outbound(struct sk_buff *skb)
 		.flowi4_oif = dev->ifindex,
 		.flowi4_tos = RT_TOS(ip4h->tos),
 		.flowi4_flags = FLOWI_FLAG_ANYSRC,
+		.flowi4_mark = skb->mark,
 		.daddr = ip4h->daddr,
 		.saddr = ip4h->saddr,
 	};