Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 581507 Details for
Bug 797209
NFS3 mounts hang on clients after getting "nfsd: Dropping request; may be revisited later" on server
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
make use_ipaddr clients self-describing
test.patch (text/plain), 4.46 KB, created by
J. Bruce Fields
on 2012-05-02 02:06:25 UTC
(
hide
)
Description:
make use_ipaddr clients self-describing
Filename:
MIME Type:
Creator:
J. Bruce Fields
Created:
2012-05-02 02:06:25 UTC
Size:
4.46 KB
patch
obsolete
>diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c >index ccc849a..15da54c 100644 >--- a/utils/mountd/auth.c >+++ b/utils/mountd/auth.c >@@ -112,15 +112,23 @@ auth_reload() > return counter; > } > >+static char *get_client_ipaddr_name(const struct sockaddr *caller) >+{ >+ char buf[INET6_ADDRSTRLEN + 1]; >+ >+ buf[0] = '$'; >+ host_ntop(caller, buf + 1, sizeof(buf) - 1); >+ return strdup(buf); >+} >+ > static char * > get_client_hostname(const struct sockaddr *caller, struct addrinfo *ai, > enum auth_error *error) > { >- char buf[INET6_ADDRSTRLEN]; > char *n; > > if (use_ipaddr) >- return strdup(host_ntop(caller, buf, sizeof(buf))); >+ return get_client_ipaddr_name(caller); > n = client_compose(ai); > *error = unknown_host; > if (!n) >@@ -131,6 +139,23 @@ get_client_hostname(const struct sockaddr *caller, struct addrinfo *ai, > return strdup("DEFAULT"); > } > >+bool ipaddr_client_matches(nfs_export *exp, struct addrinfo *ai) >+{ >+ return client_check(exp->m_client, ai); >+} >+ >+bool namelist_client_matches(nfs_export *exp, char *dom) >+{ >+ return client_member(dom, exp->m_client->m_hostname); >+} >+ >+bool client_matches(nfs_export *exp, char *dom, struct addrinfo *ai) >+{ >+ if (is_ipaddr_client(dom)) >+ return ipaddr_client_matches(exp, ai); >+ return namelist_client_matches(exp, dom); >+} >+ > /* return static nfs_export with details filled in */ > static nfs_export * > auth_authenticate_newcache(const struct sockaddr *caller, >@@ -155,9 +180,7 @@ auth_authenticate_newcache(const struct sockaddr *caller, > for (exp = exportlist[i].p_head; exp; exp = exp->m_next) { > if (strcmp(path, exp->m_export.e_path)) > continue; >- if (!use_ipaddr && !client_member(my_client.m_hostname, exp->m_client->m_hostname)) >- continue; >- if (use_ipaddr && !client_check(exp->m_client, ai)) >+ if (!client_matches(exp, my_client.m_hostname, ai)) > continue; > break; > } >diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c >index 0f939f1..c6dacd2 100644 >--- a/utils/mountd/cache.c >+++ b/utils/mountd/cache.c >@@ -328,6 +328,19 @@ static char *next_mnt(void **v, char *p) > return me->mnt_dir; > } > >+struct addrinfo *lookup_client_addr(char *dom) >+{ >+ struct addrinfo *ret; >+ struct addrinfo *tmp; >+ >+ tmp = host_pton(dom); >+ if (tmp == NULL) >+ return NULL; >+ ret = client_resolve(tmp->ai_addr); >+ freeaddrinfo(tmp); >+ return ret; >+} >+ > static void nfsd_fh(FILE *f) > { > /* request are: >@@ -441,6 +454,12 @@ static void nfsd_fh(FILE *f) > > auth_reload(); > >+ if (dom[0] == '$') { >+ ai = lookup_client_addr(dom); >+ if (!ai) >+ goto out; >+ } >+ > /* Now determine export point for this fsid/domain */ > for (i=0 ; i < MCL_MAXTYPES; i++) { > nfs_export *next_exp; >@@ -474,7 +493,8 @@ static void nfsd_fh(FILE *f) > next_exp = exp->m_next; > } > >- if (!use_ipaddr && !client_member(dom, exp->m_client->m_hostname)) >+ if (!is_ipaddr_client(dom) >+ && !namelist_client_matches(exp, dom)) > continue; > if (exp->m_export.e_mountpoint && > !is_mountpoint(exp->m_export.e_mountpoint[0]? >@@ -525,18 +545,9 @@ static void nfsd_fh(FILE *f) > continue; > break; > } >- if (use_ipaddr) { >- if (ai == NULL) { >- struct addrinfo *tmp; >- tmp = host_pton(dom); >- if (tmp == NULL) >- goto out; >- ai = client_resolve(tmp->ai_addr); >- freeaddrinfo(tmp); >- } >- if (!client_check(exp->m_client, ai)) >- continue; >- } >+ if (is_ipaddr_client(dom) >+ && !ipaddr_client_matches(exp, ai)) >+ continue; > /* It's a match !! */ > if (!found) { > found = &exp->m_export; >@@ -687,14 +698,6 @@ static int path_matches(nfs_export *exp, char *path) > } > > static int >-client_matches(nfs_export *exp, char *dom, struct addrinfo *ai) >-{ >- if (use_ipaddr) >- return client_check(exp->m_client, ai); >- return client_member(dom, exp->m_client->m_hostname); >-} >- >-static int > export_matches(nfs_export *exp, char *dom, char *path, struct addrinfo *ai) > { > return path_matches(exp, path) && client_matches(exp, dom, ai); >diff --git a/utils/mountd/mountd.h b/utils/mountd/mountd.h >index 4c184d2..6d358a7 100644 >--- a/utils/mountd/mountd.h >+++ b/utils/mountd/mountd.h >@@ -56,4 +56,13 @@ struct nfs_fh_len * > cache_get_filehandle(nfs_export *exp, int len, char *p); > int cache_export(nfs_export *exp, char *path); > >+bool ipaddr_client_matches(nfs_export *exp, struct addrinfo *ai); >+bool namelist_client_matches(nfs_export *exp, char *dom); >+bool client_matches(nfs_export *exp, char *dom, struct addrinfo *ai); >+ >+static inline bool is_ipaddr_client(char *dom) >+{ >+ return dom[0] == '$'; >+} >+ > #endif /* MOUNTD_H */
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 797209
:
579035
| 581507