Add a helper function for netlink to
be easier to create interfaces directly using netlink.
While here, fix style issue of a line above it.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 70637 Build 67520: arc lint + arc unit
Event Timeline
| sbin/ifconfig/ifconfig_netlink.c | ||
|---|---|---|
| 507–510 | IMHO, we should errx() even if error_str is NULL. | |
Comment Actions
Also (NETLINK) isn't a great error message at all. Please try grep errx sbin/ifconfig/*.c to check other error messages. Maybe just only contents of errmsg.error_str in the case it was provided and unknown error from netlink(4) in case it was not?
Comment Actions
After running my tests for this change, I remembered that
the netlink can reply with an NLMSG_ERROR containing error = 0.
That's why I didn't call errx() when error_str==NULL.
However, I've fixed the error message as you recommendeded. @glebius