X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=vswitchd%2Fbridge.c;h=6c271fb7acf80807d733d2b859b827537ff46a02;hb=c84d769c147830be5aa99ed3e6bdc92af15abd5d;hp=c86e4d5bc91ffcc1ae708273cfbe00027ad2c028;hpb=cd0cd65fe3721aa575e5eec081783f8047eda545;p=openvswitch diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index c86e4d5b..6c271fb7 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -374,6 +374,20 @@ set_up_iface(const struct ovsrec_interface *iface_cfg, struct iface *iface, xstrdup(iface_cfg->value_options[i])); } + /* Include 'other_config' keys in hash of netdev options. The + * namespace of 'other_config' and 'options' must be disjoint. + * Prefer 'options' keys over 'other_config' keys. */ + for (i = 0; i < iface_cfg->n_other_config; i++) { + char *value = xstrdup(iface_cfg->value_other_config[i]); + if (!shash_add_once(&options, iface_cfg->key_other_config[i], + value)) { + VLOG_WARN("%s: \"other_config\" key %s conflicts with existing " + "\"other_config\" or \"options\" entry...ignoring", + iface_cfg->name, iface_cfg->key_other_config[i]); + free(value); + } + } + if (create) { struct netdev_options netdev_options;