]> git.proxmox.com Git - mirror_ovs.git/commit - lib/dpctl.c
dpctl: Fix error handling and reporting regressions.
authorBen Pfaff <blp@nicira.com>
Wed, 15 Apr 2015 18:13:04 +0000 (11:13 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 16 Apr 2015 15:13:02 +0000 (08:13 -0700)
commit79ae214d2d93e4ae584455db0cc0e054b76cc711
treee1651c036d5d8ca1510e36c9c6cf6d12998ccb82
parentf097013adabf50cf8d82562f0893d60999294bba
dpctl: Fix error handling and reporting regressions.

Fixes multiple weaknesses in dpctl error reporting:

    * dpctl_set_if() didn't stop processing or report to the caller
      attempts to change a port type or number.

    * dpctl_set_if() didn't report the specifics when netdev_set_config()
      reported an error setting port configuration (which can happen even
      it returns 0).

    * The unixctl handler didn't report errors encountered during command
      processing through the JSON-RPC error mechanism, which meant that
      ovs-appctl's return code wasn't useful (as ovs-dpctl's return code
      is useful) for detecting errors in command execution.

At least the first of these is a regression from OVS 2.3.x.

A followup commit will add tests.

Reported-by: Kevin Lo <kevlo@FreeBSD.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
lib/dpctl.c