X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fnetdev-vport.c;h=4aa8bb04c114fde4f48b534507739aae73a75b4e;hb=85c9de194b9f432f7b8a66bda980cbab52a55b72;hp=adcc3529fe16320d409aab3d37ff54003a9fbebe;hpb=0d0673857b5b2a50f6aef62e0f042795d9893690;p=sliver-openvswitch.git diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index adcc3529f..4aa8bb04c 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -329,6 +329,10 @@ set_tunnel_config(struct netdev_dev *dev_, const struct smap *args) struct in_addr in_addr; if (lookup_ip(node->value, &in_addr)) { VLOG_WARN("%s: bad %s 'remote_ip'", name, type); + } else if (ip_is_multicast(in_addr.s_addr)) { + VLOG_WARN("%s: multicast remote_ip="IP_FMT" not allowed", + name, IP_ARGS(in_addr.s_addr)); + return EINVAL; } else { tnl_cfg.ip_dst = in_addr.s_addr; } @@ -446,14 +450,6 @@ set_tunnel_config(struct netdev_dev *dev_, const struct smap *args) name, type); return EINVAL; } - - if (tnl_cfg.ip_src) { - if (ip_is_multicast(tnl_cfg.ip_dst)) { - VLOG_WARN("%s: remote_ip is multicast, ignoring local_ip", name); - tnl_cfg.ip_src = 0; - } - } - if (!tnl_cfg.ttl) { tnl_cfg.ttl = DEFAULT_TTL; }