fixed ip_init

Fixed ip_init not setting ip family when IP is NULL
Merge pull request #1 from zunzu/polar

fixed ip_init