Project

General

Profile

Bug #1107 » nfs_bind.patch

Dan Kruchinin, 2011-06-13 02:11 AM

View differences:

usr/src/cmd/fs.d/nfs/lib/nfs_tbind.c Thu Jun 02 19:10:13 2011 -0400 → usr/src/cmd/fs.d/nfs/lib/nfs_tbind.c Mon Jun 13 05:59:07 2011 +0400
21 21
/*
22 22
 * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
23 23
 */
24
/*
25
 * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
26
 */
27

  
24 28

  
25 29
/*
26 30
 * nfs_tbind.c, common part for nfsd and lockd.
......
595 599
		}
596 600
	}
597 601

  
598
	if (retnconf->nc_semantics == NC_TPI_CLTS) {
602
	if (OK_TPI_TYPE(retnconf)) {
599 603
		/* Don't drop core if supporting module(s) aren't loaded. */
600 604
		(void) signal(SIGSYS, SIG_IGN);
601 605

  
......
617 621
			exit(1);
618 622
		}
619 623
	}
624
	free(addrmask.buf);
620 625

  
621 626
	/*
622 627
	 * We successfully set up the server over this transport.
......
1703 1708
	}
1704 1709
	mask->len = mask->maxlen = info.addr;
1705 1710
	if (info.addr <= 0) {
1711
		/*
1712
		 * loopback devices have infinite addr size (it is identified by -1
1713
		 * in addr field of t_info structure), so don't build the netmask
1714
		 * for them. It's a special case that should be handled properly.
1715
		 */
1716
		if ((info.addr == -1) && !strcmp(nconf->nc_protofmly, NC_LOOPBACK)) {
1717
			memset(mask, 0, sizeof(*mask));
1718
			return (0);
1719
		}
1720

  
1706 1721
		syslog(LOG_ERR, "set_addrmask: address size: %ld",
1707 1722
		    info.addr);
1708 1723
		return (-1);
    (1-1/1)