Fix the unitialized rtableid bug discovered and fixed in the previous
authorflorian <florian@openbsd.org>
Fri, 10 Jan 2014 21:57:44 +0000 (21:57 +0000)
committerflorian <florian@openbsd.org>
Fri, 10 Jan 2014 21:57:44 +0000 (21:57 +0000)
commit89527fa941fd2aca88837a337e83003b3b58bbda
tree307bfe7a01666a2e20cfa45e72039cb836a156c6
parent795c819d23e911d8ff2417254dd02121f94ad209
Fix the unitialized rtableid bug discovered and fixed in the previous
commit by brad@ by calling setsockopt SO_RTABLE only when -V is
present. As a bonus drop privileges very early in main, before option
parsing.
This brings ping6 more in line with what ping does and will make
eventual unification easier.

OK deraadt@
"works for me" brad@
sbin/ping/ping.c
sbin/ping6/ping6.c