提交 e4fb6a3c 编写于 作者: G Gerhard Stenzel 提交者: Daniel Veillard

fix handling of PORT_PROFILE_RESPONSE_INPROGRESS netlink message

During function test of the 802.1Qbg implementation in lldpad we came
across a small problem in the handling of the netlink message
corresponding to PORT_PROFILE_RESPONSE_INPROGRESS. This should not
result in returning the default rc=1.

- src/util/macvtap.c: fix getPortProfileStatus() to return 0 in that
  case and also fix an indentation problem
上级 40a0e82c
...@@ -1020,15 +1020,16 @@ getPortProfileStatus(struct nlattr **tb, int32_t vf, ...@@ -1020,15 +1020,16 @@ getPortProfileStatus(struct nlattr **tb, int32_t vf,
if (tb_port[IFLA_PORT_RESPONSE]) { if (tb_port[IFLA_PORT_RESPONSE]) {
*status = *(uint16_t *)RTA_DATA(tb_port[IFLA_PORT_RESPONSE]); *status = *(uint16_t *)RTA_DATA(tb_port[IFLA_PORT_RESPONSE]);
rc = 0; rc = 0;
} else { } else {
if (is8021Qbg) { if (is8021Qbg) {
/* no in-progress here; may be missing */ /* no in-progress here; may be missing */
*status = PORT_PROFILE_RESPONSE_INPROGRESS; *status = PORT_PROFILE_RESPONSE_INPROGRESS;
} else { rc = 0;
msg = _("no IFLA_PORT_RESPONSE found in netlink message"); } else {
goto err_exit; msg = _("no IFLA_PORT_RESPONSE found in netlink message");
} goto err_exit;
}
} }
err_exit: err_exit:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册