Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c03b4375
Commit
c03b4375
authored
Jan 05, 2003
by
Neil Brown
Committed by
Linus Torvalds
Jan 05, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] knfsd: Provide content file for auth.unix.ip cache
parent
007f7383
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
net/sunrpc/svcauth_unix.c
net/sunrpc/svcauth_unix.c
+29
-0
No files found.
net/sunrpc/svcauth_unix.c
View file @
c03b4375
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#include <linux/sunrpc/svcsock.h>
#include <linux/sunrpc/svcsock.h>
#include <linux/sunrpc/svcauth.h>
#include <linux/sunrpc/svcauth.h>
#include <linux/err.h>
#include <linux/err.h>
#include <linux/seq_file.h>
#define RPCDBG_FACILITY RPCDBG_AUTH
#define RPCDBG_FACILITY RPCDBG_AUTH
...
@@ -210,6 +211,33 @@ static int ip_map_parse(struct cache_detail *cd,
...
@@ -210,6 +211,33 @@ static int ip_map_parse(struct cache_detail *cd,
return
0
;
return
0
;
}
}
static
int
ip_map_show
(
struct
seq_file
*
m
,
struct
cache_detail
*
cd
,
struct
cache_head
*
h
,
char
*
pbuf
)
{
struct
ip_map
*
im
;
struct
in_addr
addr
;
if
(
h
==
NULL
)
{
seq_puts
(
m
,
"#class IP domain
\n
"
);
return
0
;
}
im
=
container_of
(
h
,
struct
ip_map
,
h
);
/* class addr domain */
addr
=
im
->
m_addr
;
seq_printf
(
m
,
"%s %d.%d.%d.%d %s
\n
"
,
im
->
m_class
,
htonl
(
addr
.
s_addr
)
>>
24
&
0xff
,
htonl
(
addr
.
s_addr
)
>>
16
&
0xff
,
htonl
(
addr
.
s_addr
)
>>
8
&
0xff
,
htonl
(
addr
.
s_addr
)
>>
0
&
0xff
,
im
->
m_client
->
h
.
name
);
return
0
;
}
struct
cache_detail
ip_map_cache
=
{
struct
cache_detail
ip_map_cache
=
{
.
hash_size
=
IP_HASHMAX
,
.
hash_size
=
IP_HASHMAX
,
.
hash_table
=
ip_table
,
.
hash_table
=
ip_table
,
...
@@ -217,6 +245,7 @@ struct cache_detail ip_map_cache = {
...
@@ -217,6 +245,7 @@ struct cache_detail ip_map_cache = {
.
cache_put
=
ip_map_put
,
.
cache_put
=
ip_map_put
,
.
cache_request
=
ip_map_request
,
.
cache_request
=
ip_map_request
,
.
cache_parse
=
ip_map_parse
,
.
cache_parse
=
ip_map_parse
,
.
cache_show
=
ip_map_show
,
};
};
static
DefineSimpleCacheLookup
(
ip_map
)
static
DefineSimpleCacheLookup
(
ip_map
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment