X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Fvport-gre.c;h=95ac4bb295e148e32af593e28a67e70eb9ccf45b;hb=b37e6334fd80a6460aabc95f05eb8ab68e5a82ed;hp=24c53f89680d4b46ee85f180fe8d197e692b3c88;hpb=df2c07f4338faac04f4969f243fe4e8083b309ac;p=sliver-openvswitch.git diff --git a/datapath/vport-gre.c b/datapath/vport-gre.c index 24c53f896..95ac4bb29 100644 --- a/datapath/vport-gre.c +++ b/datapath/vport-gre.c @@ -188,13 +188,15 @@ static void gre_err(struct sk_buff *skb, u32 info) 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; @@ -207,7 +209,7 @@ static void gre_err(struct sk_buff *skb, u32 info) * 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) != @@ -330,8 +332,8 @@ static int gre_rcv(struct sk_buff *skb) 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; @@ -389,7 +391,7 @@ static void gre_exit(void) const struct vport_ops gre_vport_ops = { .type = OVS_VPORT_TYPE_GRE, - .flags = VPORT_F_GEN_STATS | VPORT_F_TUN_ID, + .flags = VPORT_F_TUN_ID, .init = gre_init, .exit = gre_exit, .create = gre_create,