Various BSD device configuration improvements

This pull request fixes some confusing behaviors for BSD-style TUN/TAP devices.