Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec...
[firefly-linux-kernel-4.4.55.git] / net / xfrm / xfrm_output.c
index fbcedbe33190346a40fc148369757a6ef64a2106..68ada2ca4b60707ac70b45aa6f0a9ea142a9dd16 100644 (file)
@@ -38,6 +38,18 @@ static int xfrm_skb_check_space(struct sk_buff *skb)
        return pskb_expand_head(skb, nhead, ntail, GFP_ATOMIC);
 }
 
+/* Children define the path of the packet through the
+ * Linux networking.  Thus, destinations are stackable.
+ */
+
+static struct dst_entry *skb_dst_pop(struct sk_buff *skb)
+{
+       struct dst_entry *child = dst_clone(skb_dst(skb)->child);
+
+       skb_dst_drop(skb);
+       return child;
+}
+
 static int xfrm_output_one(struct sk_buff *skb, int err)
 {
        struct dst_entry *dst = skb_dst(skb);