|
@@ -15,6 +15,7 @@
|
|
#include <net/dst.h>
|
|
#include <net/dst.h>
|
|
#include <net/xfrm.h>
|
|
#include <net/xfrm.h>
|
|
#include <net/ip.h>
|
|
#include <net/ip.h>
|
|
|
|
+#include <net/vrf.h>
|
|
|
|
|
|
static struct xfrm_policy_afinfo xfrm4_policy_afinfo;
|
|
static struct xfrm_policy_afinfo xfrm4_policy_afinfo;
|
|
|
|
|
|
@@ -107,8 +108,10 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
|
|
struct flowi4 *fl4 = &fl->u.ip4;
|
|
struct flowi4 *fl4 = &fl->u.ip4;
|
|
int oif = 0;
|
|
int oif = 0;
|
|
|
|
|
|
- if (skb_dst(skb))
|
|
|
|
- oif = skb_dst(skb)->dev->ifindex;
|
|
|
|
|
|
+ if (skb_dst(skb)) {
|
|
|
|
+ oif = vrf_master_ifindex(skb_dst(skb)->dev) ?
|
|
|
|
+ : skb_dst(skb)->dev->ifindex;
|
|
|
|
+ }
|
|
|
|
|
|
memset(fl4, 0, sizeof(struct flowi4));
|
|
memset(fl4, 0, sizeof(struct flowi4));
|
|
fl4->flowi4_mark = skb->mark;
|
|
fl4->flowi4_mark = skb->mark;
|