X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fautopath.c;h=9da646339a19587ca6a7f928bf3b1628cef195ed;hb=7eb1bd81120806b4189e860b2a6468925d8e7bba;hp=b204e847307230ae72a19eb747ced40ad741963d;hpb=c6100d92142bc3dd325180cb4e10553eb4341731;p=openvswitch diff --git a/lib/autopath.c b/lib/autopath.c index b204e847..9da64633 100644 --- a/lib/autopath.c +++ b/lib/autopath.c @@ -37,6 +37,7 @@ autopath_parse(struct ofpact_autopath *ap, const char *s_) { char *s; char *id_str, *dst, *save_ptr; + uint16_t port; ofpact_init_AUTOPATH(ap); @@ -49,10 +50,10 @@ autopath_parse(struct ofpact_autopath *ap, const char *s_) ovs_fatal(0, "%s: not enough arguments to autopath action", s_); } - ap->port = ofputil_port_from_string(id_str); - if (!ap->port) { + if (!ofputil_port_from_string(id_str, &port)) { ovs_fatal(0, "%s: bad port number", s_); } + ap->port = port; mf_parse_subfield(&ap->dst, dst); if (ap->dst.n_bits < 16) {