Deleted Added
full compact
rpcbind.c (107952) rpcbind.c (108533)
1/* $NetBSD: rpcbind.c,v 1.1 2000/06/02 23:15:42 fvdl Exp $ */
1/* $NetBSD: rpcbind.c,v 1.1 2000/06/02 23:15:42 fvdl Exp $ */
2/* $FreeBSD: head/usr.sbin/rpcbind/rpcbind.c 107952 2002-12-16 22:24:26Z mbr $ */
2/* $FreeBSD: head/usr.sbin/rpcbind/rpcbind.c 108533 2003-01-01 18:49:04Z schweikh $ */
3
4/*
5 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
6 * unrestricted use provided that this legend is included on all tape
7 * media and as a part of the software program in whole or part. Users
8 * may copy or modify Sun RPC without charge, but are not authorized
9 * to license or distribute it to anyone else except as part of a product or
10 * program developed by the user.

--- 81 unchanged lines hidden (view full) ---

92
93char **hosts = NULL;
94int nhosts = 0;
95int on = 1;
96int rpcbindlockfd;
97
98#ifdef WARMSTART
99/* Local Variable */
3
4/*
5 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
6 * unrestricted use provided that this legend is included on all tape
7 * media and as a part of the software program in whole or part. Users
8 * may copy or modify Sun RPC without charge, but are not authorized
9 * to license or distribute it to anyone else except as part of a product or
10 * program developed by the user.

--- 81 unchanged lines hidden (view full) ---

92
93char **hosts = NULL;
94int nhosts = 0;
95int on = 1;
96int rpcbindlockfd;
97
98#ifdef WARMSTART
99/* Local Variable */
100static int warmstart = 0; /* Grab a old copy of registrations */
100static int warmstart = 0; /* Grab an old copy of registrations. */
101#endif
102
103#ifdef PORTMAP
104struct pmaplist *list_pml; /* A list of version 2 rpcbind services */
105char *udptrans; /* Name of UDP transport */
106char *tcptrans; /* Name of TCP transport */
107char *udp_uaddr; /* Universal UDP address */
108char *tcp_uaddr; /* Universal TCP address */

--- 225 unchanged lines hidden (view full) ---

334 }
335 switch (hints.ai_family) {
336 case AF_INET:
337 if (inet_pton(AF_INET, hosts[nhostsbak],
338 host_addr) == 1) {
339 hints.ai_flags &= AI_NUMERICHOST;
340 } else {
341 /*
101#endif
102
103#ifdef PORTMAP
104struct pmaplist *list_pml; /* A list of version 2 rpcbind services */
105char *udptrans; /* Name of UDP transport */
106char *tcptrans; /* Name of TCP transport */
107char *udp_uaddr; /* Universal UDP address */
108char *tcp_uaddr; /* Universal TCP address */

--- 225 unchanged lines hidden (view full) ---

334 }
335 switch (hints.ai_family) {
336 case AF_INET:
337 if (inet_pton(AF_INET, hosts[nhostsbak],
338 host_addr) == 1) {
339 hints.ai_flags &= AI_NUMERICHOST;
340 } else {
341 /*
342 * Skip if we have a AF_INET6 adress
342 * Skip if we have an AF_INET6 adress.
343 */
344 if (inet_pton(AF_INET6,
345 hosts[nhostsbak], host_addr) == 1)
346 continue;
347 }
348 break;
349 case AF_INET6:
350 if (inet_pton(AF_INET6, hosts[nhostsbak],
351 host_addr) == 1) {
352 hints.ai_flags &= AI_NUMERICHOST;
353 } else {
354 /*
343 */
344 if (inet_pton(AF_INET6,
345 hosts[nhostsbak], host_addr) == 1)
346 continue;
347 }
348 break;
349 case AF_INET6:
350 if (inet_pton(AF_INET6, hosts[nhostsbak],
351 host_addr) == 1) {
352 hints.ai_flags &= AI_NUMERICHOST;
353 } else {
354 /*
355 * Skip if we have a AF_INET adress
355 * Skip if we have an AF_INET adress.
356 */
357 if (inet_pton(AF_INET, hosts[nhostsbak],
358 host_addr) == 1)
359 continue;
360 }
361 if (setsockopt(fd, IPPROTO_IPV6,
362 IPV6_V6ONLY, &on, sizeof on) < 0) {
363 syslog(LOG_ERR,

--- 391 unchanged lines hidden ---
356 */
357 if (inet_pton(AF_INET, hosts[nhostsbak],
358 host_addr) == 1)
359 continue;
360 }
361 if (setsockopt(fd, IPPROTO_IPV6,
362 IPV6_V6ONLY, &on, sizeof on) < 0) {
363 syslog(LOG_ERR,

--- 391 unchanged lines hidden ---