Fix Error "invalid argument: `family` must be 4 or 6"
Merge pull request #910 from afc163/2.x

Fix Error "invalid argument: `family` must be 4 or 6"