Add a postproc function for af_inet, and add interface flags as a
parameter. Check there if setting an address without a mask unless
the interface is loopback or point-to-point, where mask is not really
meaningful; warn if so. This will hopefully be an error in the future.
Details
Details
- Reviewers
bz - Commits
- rGd8237b955528: ifconfig: warn if setting an Internet address without mask
Tested with and without masks.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 42524 Build 39412: arc lint + arc unit
Event Timeline
Comment Actions
Otherwise looks good to me but I am not the best ifconfig-review person; especially I cannot test the v4 changes (easily)
sbin/ifconfig/ifconfig.c | ||
---|---|---|
1182 | Can you make this a bool? |
Comment Actions
No one seems to have done structural work on ifconfig for a while. Suggestions for other reviewers welcome, but I think it is pretty well tested.
sbin/ifconfig/ifconfig.c | ||
---|---|---|
1182 | Good suggestion, thanks. |
Comment Actions
Still looks okay (untested); the ifconfig man page examples section seemed to already look good; src/libexec/rc/rc.conf probably needs a pass as well.