FreeBSD Bugzilla – Attachment 13774 Details for
Bug 26069
[Fix] nfsd with ipv4 only
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 3.43 KB, created by
mb
on 2001-03-25 14:00:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
mb
Created:
2001-03-25 14:00:01 UTC
Size:
3.43 KB
patch
obsolete
>--- sbin/nfsd/nfsd.c Mon Mar 19 13:50:01 2001 >+++ sbin/nfsd/nfsd.c Sat Mar 24 13:02:11 2001 >@@ -256,7 +256,8 @@ > ip6flag = 1; > s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); > if (s < 0 && (errno == EPROTONOSUPPORT || >- errno == EPFNOSUPPORT || errno == EAFNOSUPPORT)) >+ errno == EPFNOSUPPORT || errno == EAFNOSUPPORT) || >+ (getnetconfigent("udp6") == NULL && getnetconfigent("tcp6") == NULL)) > ip6flag = 0; > else > close(s); >@@ -548,12 +549,15 @@ > } > nconf_udp = getnetconfigent("udp"); > if (nconf_udp == NULL) >- err(1, "getnetconfigent udp failed"); >- nb_udp.buf = ai_udp->ai_addr; >- nb_udp.len = nb_udp.maxlen = ai_udp->ai_addrlen; >- if ((!rpcb_set(RPCPROG_NFS, 2, nconf_udp, &nb_udp)) || >- (!rpcb_set(RPCPROG_NFS, 3, nconf_udp, &nb_udp))) >- err(1, "rpcb_set udp failed"); >+ syslog(LOG_ERR, "getnetconfigent udp failed"); >+ else { >+ nb_udp.buf = ai_udp->ai_addr; >+ nb_udp.len = nb_udp.maxlen = ai_udp->ai_addrlen; >+ if ((!rpcb_set(RPCPROG_NFS, 2, nconf_udp, >+ &nb_udp)) || (!rpcb_set(RPCPROG_NFS, 3, >+ nconf_udp, &nb_udp))) >+ syslog(LOG_ERR, "rpcb_set udp failed"); >+ } > freeaddrinfo(ai_udp); > } > } >@@ -618,12 +622,16 @@ > } > nconf_udp6 = getnetconfigent("udp6"); > if (nconf_udp6 == NULL) >- err(1, "getnetconfigent udp6 failed"); >- nb_udp6.buf = ai_udp6->ai_addr; >- nb_udp6.len = nb_udp6.maxlen = ai_udp6->ai_addrlen; >- if ((!rpcb_set(RPCPROG_NFS, 2, nconf_udp6, &nb_udp6)) || >- (!rpcb_set(RPCPROG_NFS, 3, nconf_udp6, &nb_udp6))) >- err(1, "rpcb_set udp6 failed"); >+ syslog(LOG_ERR, "getnetconfigent udp6 failed"); >+ else { >+ nb_udp6.buf = ai_udp6->ai_addr; >+ nb_udp6.len = nb_udp6.maxlen; >+ nb_udp6.len = ai_udp6->ai_addrlen; >+ if ((!rpcb_set(RPCPROG_NFS, 2, nconf_udp6, >+ &nb_udp6)) || (!rpcb_set(RPCPROG_NFS, 3, >+ nconf_udp6, &nb_udp6))) >+ syslog(LOG_ERR, "rpcb_set udp6 failed"); >+ } > freeaddrinfo(ai_udp6); > } > } >@@ -684,13 +692,15 @@ > } > nconf_tcp = getnetconfigent("tcp"); > if (nconf_tcp == NULL) >- err(1, "getnetconfigent tcp failed"); >- nb_tcp.buf = ai_tcp->ai_addr; >- nb_tcp.len = nb_tcp.maxlen = ai_tcp->ai_addrlen; >- if ((!rpcb_set(RPCPROG_NFS, 2, nconf_tcp, >- &nb_tcp)) || (!rpcb_set(RPCPROG_NFS, 3, >- nconf_tcp, &nb_tcp))) >- err(1, "rpcb_set tcp failed"); >+ syslog(LOG_ERR, "getnetconfigent tcp failed"); >+ else { >+ nb_tcp.buf = ai_tcp->ai_addr; >+ nb_tcp.len = nb_tcp.maxlen = ai_tcp->ai_addrlen; >+ if ((!rpcb_set(RPCPROG_NFS, 2, nconf_tcp, >+ &nb_tcp)) || (!rpcb_set(RPCPROG_NFS, 3, >+ nconf_tcp, &nb_tcp))) >+ syslog(LOG_ERR, "rpcb_set tcp failed"); >+ } > freeaddrinfo(ai_tcp); > } > } >@@ -759,12 +769,16 @@ > } > nconf_tcp6 = getnetconfigent("tcp6"); > if (nconf_tcp6 == NULL) >- err(1, "getnetconfigent tcp6 failed"); >- nb_tcp6.buf = ai_tcp6->ai_addr; >- nb_tcp6.len = nb_tcp6.maxlen = ai_tcp6->ai_addrlen; >- if ((!rpcb_set(RPCPROG_NFS, 2, nconf_tcp6, &nb_tcp6)) || >- (!rpcb_set(RPCPROG_NFS, 3, nconf_tcp6, &nb_tcp6))) >- err(1, "rpcb_set tcp6 failed"); >+ syslog(LOG_ERR, "getnetconfigent tcp6 failed"); >+ else { >+ nb_tcp6.buf = ai_tcp6->ai_addr; >+ nb_tcp6.len = nb_tcp6.maxlen; >+ nb_tcp6.len = ai_tcp6->ai_addrlen; >+ if ((!rpcb_set(RPCPROG_NFS, 2, nconf_tcp6, >+ &nb_tcp6)) || (!rpcb_set(RPCPROG_NFS, >+ 3, nconf_tcp6, &nb_tcp6))) >+ syslog(LOG_ERR, "rpcb_set tcp6 failed"); >+ } > freeaddrinfo(ai_tcp6); > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 26069
: 13774