net-util: call ioctl() only if necessary

In case when update of current values is not necessary we still might end up
calling ioctl(), because need_update variable is not explicitly initialized.
systemctl: return r instead of always returning 0