tunneling: Don't send ICMP messages if no tunnel port is found.
[sliver-openvswitch.git] / datapath / vport-gre.c
index f6fad26..680e7b3 100644 (file)
@@ -274,10 +274,8 @@ static int gre_rcv(struct sk_buff *skb)
        iph = ip_hdr(skb);
        vport = ovs_tnl_find_port(dev_net(skb->dev), iph->daddr, iph->saddr, key,
                                  tunnel_type, &mutable);
-       if (unlikely(!vport)) {
-               icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
+       if (unlikely(!vport))
                goto error;
-       }
 
        tnl_flags = gre_flags_to_tunnel_flags(mutable, gre_flags, &key);
        tnl_tun_key_init(&tun_key, iph, key, tnl_flags);
@@ -306,11 +304,6 @@ static struct vport *gre_create(const struct vport_parms *parms)
        return ovs_tnl_create(parms, &ovs_gre_vport_ops, &gre_tnl_ops);
 }
 
-static struct vport *gre_create_ft(const struct vport_parms *parms)
-{
-       return ovs_tnl_create(parms, &ovs_gre_ft_vport_ops, &gre_tnl_ops);
-}
-
 static const struct tnl_ops gre64_tnl_ops = {
        .tunnel_type    = TNL_T_PROTO_GRE64,
        .ipproto        = IPPROTO_GRE,
@@ -357,21 +350,6 @@ static void gre_exit(void)
        inet_del_protocol(&gre_protocol_handlers, IPPROTO_GRE);
 }
 
-const struct vport_ops ovs_gre_ft_vport_ops = {
-       .type           = OVS_VPORT_TYPE_FT_GRE,
-       .flags          = VPORT_F_TUN_ID,
-       .init           = gre_init,
-       .exit           = gre_exit,
-       .create         = gre_create_ft,
-       .destroy        = ovs_tnl_destroy,
-       .set_addr       = ovs_tnl_set_addr,
-       .get_name       = ovs_tnl_get_name,
-       .get_addr       = ovs_tnl_get_addr,
-       .get_options    = ovs_tnl_get_options,
-       .set_options    = ovs_tnl_set_options,
-       .send           = ovs_tnl_send,
-};
-
 const struct vport_ops ovs_gre_vport_ops = {
        .type           = OVS_VPORT_TYPE_GRE,
        .flags          = VPORT_F_TUN_ID,
@@ -379,9 +357,7 @@ const struct vport_ops ovs_gre_vport_ops = {
        .exit           = gre_exit,
        .create         = gre_create,
        .destroy        = ovs_tnl_destroy,
-       .set_addr       = ovs_tnl_set_addr,
        .get_name       = ovs_tnl_get_name,
-       .get_addr       = ovs_tnl_get_addr,
        .get_options    = ovs_tnl_get_options,
        .set_options    = ovs_tnl_set_options,
        .send           = ovs_tnl_send,
@@ -394,9 +370,7 @@ const struct vport_ops ovs_gre64_vport_ops = {
        .exit           = gre_exit,
        .create         = gre_create64,
        .destroy        = ovs_tnl_destroy,
-       .set_addr       = ovs_tnl_set_addr,
        .get_name       = ovs_tnl_get_name,
-       .get_addr       = ovs_tnl_get_addr,
        .get_options    = ovs_tnl_get_options,
        .set_options    = ovs_tnl_set_options,
        .send           = ovs_tnl_send,