]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/ipv4/gre_demux.c
taprio: Add missing policy validation for flags
[linux.git] / net / ipv4 / gre_demux.c
index 44bfeecac33e58f5fae1f1790825f73cf8ca6ffb..5fd6e8ed02b5d5c201ff8dc8cf31db3994fcdcf7 100644 (file)
@@ -127,7 +127,7 @@ int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi,
                if (!pskb_may_pull(skb, nhs + hdr_len + sizeof(*ershdr)))
                        return -EINVAL;
 
-               ershdr = (struct erspan_base_hdr *)options;
+               ershdr = (struct erspan_base_hdr *)(skb->data + nhs + hdr_len);
                tpi->key = cpu_to_be32(get_session_id(ershdr));
        }