dabbad: add link_destroy wrapper function.

unlike free(3) which does not perform any operation if a NULL pointer is
given. nl_object_free() will try to access the object's operations which
causes a segfault when a NULL pointer is given.
The new wrapper function link_destroy() takes a pointer to struct
rtnl_link and frees it if non-NULL.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
dabbad: fix error code return in 'interface capabilities'

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
dabbad: fix pointer check to error code field.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
dabbad: apply settings only if fetched correctly.

The modified settings are always the current interface settings where
only the requested changes are modified.
If the interface settings could not be fetched the modifying them
afterwards would lead to unexpected behavior.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
dabbad: only call rntl_link_change() when needed.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
rpc: add error code in 'interface driver' msg.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
dabbad: return error code in 'interface driver'.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
dabba: support error code in 'interface driver'.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
rpc: add error code in 'interface statistics' msg.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
dabbad: return error code in 'interface statistics'.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
dabba: support error code in 'interface statistics'.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>