View | Details | Raw Unified | Return to bug 31632
Collapse All | Expand All

(-)/usr/src/sbin/ip6fw/ip6fw.c (-2 / +5 lines)
Lines 516-524 Link Here
516
	char *host;
516
	char *host;
517
	u_char *addr;
517
	u_char *addr;
518
{
518
{
519
	struct hostent *he = gethostbyname2(host, family);
519
	struct hostent *he;
520
520
521
	if (!he)
521
	if (inet_pton(family, host, &addr) == 1)
522
		return 0;
523
524
	if (!(he = gethostbyname2(host, family)))
522
		return(-1);
525
		return(-1);
523
526
524
	memcpy(addr, he->h_addr_list[0], he->h_length);
527
	memcpy(addr, he->h_addr_list[0], he->h_length);

Return to bug 31632