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
Kirill Smelkov
linux
Commits
2ee7b6bf
Commit
2ee7b6bf
authored
Mar 04, 2005
by
Hideaki Yoshifuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET] NEIGHBOUR: Add hook for sysctl strategy.
Signed-off-by:
Hideaki YOSHIFUJI
<
yoshfuji@linux-ipv6.org
>
parent
63c6297f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
9 deletions
+16
-9
include/net/neighbour.h
include/net/neighbour.h
+2
-1
net/core/neighbour.c
net/core/neighbour.c
+3
-2
net/ipv4/arp.c
net/ipv4/arp.c
+1
-1
net/ipv4/devinet.c
net/ipv4/devinet.c
+2
-2
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+7
-2
net/ipv6/ndisc.c
net/ipv6/ndisc.c
+1
-1
No files found.
include/net/neighbour.h
View file @
2ee7b6bf
...
...
@@ -274,7 +274,8 @@ extern int neigh_sysctl_register(struct net_device *dev,
struct
neigh_parms
*
p
,
int
p_id
,
int
pdev_id
,
char
*
p_name
,
proc_handler
*
proc_handler
);
proc_handler
*
proc_handler
,
ctl_handler
*
strategy
);
extern
void
neigh_sysctl_unregister
(
struct
neigh_parms
*
p
);
static
inline
void
__neigh_parms_put
(
struct
neigh_parms
*
parms
)
...
...
net/core/neighbour.c
View file @
2ee7b6bf
...
...
@@ -2200,7 +2200,7 @@ static struct neigh_sysctl_table {
int
neigh_sysctl_register
(
struct
net_device
*
dev
,
struct
neigh_parms
*
p
,
int
p_id
,
int
pdev_id
,
char
*
p_name
,
proc_handler
*
handler
)
proc_handler
*
handler
,
ctl_handler
*
strategy
)
{
struct
neigh_sysctl_table
*
t
=
kmalloc
(
sizeof
(
*
t
),
GFP_KERNEL
);
const
char
*
dev_name_source
=
NULL
;
...
...
@@ -2214,8 +2214,9 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
t
->
neigh_vars
[
1
].
data
=
&
p
->
ucast_probes
;
t
->
neigh_vars
[
2
].
data
=
&
p
->
app_probes
;
t
->
neigh_vars
[
3
].
data
=
&
p
->
retrans_time
;
if
(
handler
)
{
if
(
handler
||
strategy
)
{
t
->
neigh_vars
[
3
].
proc_handler
=
handler
;
t
->
neigh_vars
[
3
].
strategy
=
strategy
;
t
->
neigh_vars
[
3
].
extra1
=
dev
;
}
t
->
neigh_vars
[
4
].
data
=
&
p
->
base_reachable_time
;
...
...
net/ipv4/arp.c
View file @
2ee7b6bf
...
...
@@ -1243,7 +1243,7 @@ void __init arp_init(void)
arp_proc_init
();
#ifdef CONFIG_SYSCTL
neigh_sysctl_register
(
NULL
,
&
arp_tbl
.
parms
,
NET_IPV4
,
NET_IPV4_NEIGH
,
"ipv4"
,
NULL
);
NET_IPV4_NEIGH
,
"ipv4"
,
NULL
,
NULL
);
#endif
register_netdevice_notifier
(
&
arp_netdev_notifier
);
}
...
...
net/ipv4/devinet.c
View file @
2ee7b6bf
...
...
@@ -153,7 +153,7 @@ struct in_device *inetdev_init(struct net_device *dev)
dev_hold
(
dev
);
#ifdef CONFIG_SYSCTL
neigh_sysctl_register
(
dev
,
in_dev
->
arp_parms
,
NET_IPV4
,
NET_IPV4_NEIGH
,
"ipv4"
,
NULL
);
NET_IPV4_NEIGH
,
"ipv4"
,
NULL
,
NULL
);
#endif
/* Account for reference dev->ip_ptr */
...
...
@@ -992,7 +992,7 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
devinet_sysctl_unregister
(
&
in_dev
->
cnf
);
neigh_sysctl_unregister
(
in_dev
->
arp_parms
);
neigh_sysctl_register
(
dev
,
in_dev
->
arp_parms
,
NET_IPV4
,
NET_IPV4_NEIGH
,
"ipv4"
,
NULL
);
NET_IPV4_NEIGH
,
"ipv4"
,
NULL
,
NULL
);
devinet_sysctl_register
(
in_dev
,
&
in_dev
->
cnf
);
#endif
break
;
...
...
net/ipv6/addrconf.c
View file @
2ee7b6bf
...
...
@@ -391,7 +391,9 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
ndev
->
tstamp
=
jiffies
;
#ifdef CONFIG_SYSCTL
neigh_sysctl_register
(
dev
,
ndev
->
nd_parms
,
NET_IPV6
,
NET_IPV6_NEIGH
,
"ipv6"
,
&
ndisc_ifinfo_sysctl_change
);
NET_IPV6_NEIGH
,
"ipv6"
,
&
ndisc_ifinfo_sysctl_change
,
NULL
);
addrconf_sysctl_register
(
ndev
,
&
ndev
->
cnf
);
#endif
}
...
...
@@ -1982,7 +1984,10 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
if
(
idev
)
{
addrconf_sysctl_unregister
(
&
idev
->
cnf
);
neigh_sysctl_unregister
(
idev
->
nd_parms
);
neigh_sysctl_register
(
dev
,
idev
->
nd_parms
,
NET_IPV6
,
NET_IPV6_NEIGH
,
"ipv6"
,
&
ndisc_ifinfo_sysctl_change
);
neigh_sysctl_register
(
dev
,
idev
->
nd_parms
,
NET_IPV6
,
NET_IPV6_NEIGH
,
"ipv6"
,
&
ndisc_ifinfo_sysctl_change
,
NULL
);
addrconf_sysctl_register
(
idev
,
&
idev
->
cnf
);
}
#endif
...
...
net/ipv6/ndisc.c
View file @
2ee7b6bf
...
...
@@ -1584,7 +1584,7 @@ int __init ndisc_init(struct net_proto_family *ops)
#ifdef CONFIG_SYSCTL
neigh_sysctl_register
(
NULL
,
&
nd_tbl
.
parms
,
NET_IPV6
,
NET_IPV6_NEIGH
,
"ipv6"
,
&
ndisc_ifinfo_sysctl_change
);
"ipv6"
,
&
ndisc_ifinfo_sysctl_change
,
NULL
);
#endif
register_netdevice_notifier
(
&
ndisc_netdev_notifier
);
...
...
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