It's sad because this changes a regular pattern into an irregular one,
which will create spurious diffs if more work is added at the end of
the function. Still, this is easier than fixing the lint runner to
ignore the report.
Also move netlink and netns code from common to net
Creates interface if not already there
Adds addresses
Move the set link 'up' to after addresses are added