]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/ipv4/ip_tunnel_core.c
net: store port/representator id in metadata_dst
[linux.git] / net / ipv4 / ip_tunnel_core.c
index 90e11479c725dbed365b154f721214ad8ec3251c..2f39479be92f4602c8cb3f95ca8bc3ca56469f25 100644 (file)
@@ -134,10 +134,12 @@ struct metadata_dst *iptunnel_metadata_reply(struct metadata_dst *md,
        struct metadata_dst *res;
        struct ip_tunnel_info *dst, *src;
 
-       if (!md || md->u.tun_info.mode & IP_TUNNEL_INFO_TX)
+       if (!md || md->type != METADATA_IP_TUNNEL ||
+           md->u.tun_info.mode & IP_TUNNEL_INFO_TX)
+
                return NULL;
 
-       res = metadata_dst_alloc(0, flags);
+       res = metadata_dst_alloc(0, METADATA_IP_TUNNEL, flags);
        if (!res)
                return NULL;