return;
iph = (struct iphdr *)skb->data;
+ if (ipv4_is_multicast(iph->daddr))
+ return;
tunnel_hdr_len = parse_header(iph, &flags, &key);
if (tunnel_hdr_len < 0)
return;
- vport = tnl_find_port(iph->saddr, iph->daddr, key,
- TNL_T_PROTO_GRE | TNL_T_KEY_EITHER, &mutable);
+ vport = tnl_find_port(iph->saddr, iph->daddr, key, TNL_T_PROTO_GRE,
+ &mutable);
if (!vport)
return;
* out key as if it were the in key and then check to see if the input
* and output keys are the same.
*/
- if (mutable->in_key != mutable->out_key)
+ if (mutable->key.in_key != mutable->out_key)
return;
if (!!(mutable->flags & TNL_F_IN_KEY_MATCH) !=
goto error;
iph = ip_hdr(skb);
- vport = tnl_find_port(iph->daddr, iph->saddr, key,
- TNL_T_PROTO_GRE | TNL_T_KEY_EITHER, &mutable);
+ vport = tnl_find_port(iph->daddr, iph->saddr, key, TNL_T_PROTO_GRE,
+ &mutable);
if (unlikely(!vport)) {
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
goto error;