Skip to contentSkip to conversation

neigh: use neigh_parms_net() to get struct neigh_parms->net pointer

PATCH Applied Jiri Pirko 3 participants 5 messages Dec 10, 2013

Subsystems (2)
lore
Share & tools
lore

Jiri Pirko

author
#0 lore raw

PATCH 1/1 neigh: use neigh_parms_net() to get struct neigh_parms->net pointer

This fixes compile error when CONFIG_NET_NS is not set.

Introduced by:
commit 1d4c8c29841b9991cdf3c7cc4ba7f96a94f104ca
"neigh: restore old behaviour of default parms values"

---
 net/core/neighbour.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/neighbour.c +1 -1
index ce2b775..8be82a7 100644
@@ -2850,7 +2850,7 @@ static void neigh_proc_update(struct ctl_table *ctl, int write)
 {
 	struct net_device *dev = ctl->extra1;
 	struct neigh_parms *p = ctl->extra2;
-	struct net *net = p->net;
+	struct net *net = neigh_parms_net(p);
 	int index = (int *) ctl->data - p->data;
 
 	if (!write)
Signature · 1 line
1.8.3.1
maintainer Applied
#1 lore raw

From: Jiri Pirko <[email protected]>
Date: Tue, 10 Dec 2013 23:55:07 +0100

Quoted 7 lines

This fixes compile error when CONFIG_NET_NS is not set.

Introduced by:
commit 1d4c8c29841b9991cdf3c7cc4ba7f96a94f104ca
"neigh: restore old behaviour of default parms values"

...

net/core/neighbour.c static void neigh_proc_update(struct ctl_table *ctl, int write) · line 2853

Quoted 2 lines
net/core/neighbour.c +1 -1
-	struct net *net = p->net;
+	struct net *net = neigh_parms_net(p);

Hey look at that, the interface already existed :-)

Applied, thanks Jiri.

#2 lore raw
Quoted 9 lines · David Miller

From: Jiri Pirko <[email protected]>
Date: Tue, 10 Dec 2013 23:55:07 +0100

Quoted 6 lines

This fixes compile error when CONFIG_NET_NS is not set.

Introduced by:
commit 1d4c8c29841b9991cdf3c7cc4ba7f96a94f104ca
"neigh: restore old behaviour of default parms values"

Quoted 6 lines
Quoted 1 line

...

net/core/neighbour.c static void neigh_proc_update(struct ctl_table *ctl, int write) · line 2853

Quoted 2 lines
net/core/neighbour.c +1 -1
-	struct net *net = p->net;
+	struct net *net = neigh_parms_net(p);

Hey look at that, the interface already existed :-)

Yep, provided in commit e42ea986e4a4ca about 5 years ago ;)

#3 lore raw
Quoted 2 lines · Eric Dumazet

Yep, provided in commit e42ea986e4a4ca about 5 years ago ;)

Actually its older than that : commit 57da52c1e62c6

author
#4 lore raw
In reply to David Miller
Quoted 9 lines · Tue, Dec 10, 2013 at 11:59:29PM CET, [email protected] wrote:

From: Jiri Pirko <[email protected]>
Date: Tue, 10 Dec 2013 23:55:07 +0100

Quoted 6 lines

This fixes compile error when CONFIG_NET_NS is not set.

Introduced by:
commit 1d4c8c29841b9991cdf3c7cc4ba7f96a94f104ca
"neigh: restore old behaviour of default parms values"

Quoted 6 lines
Quoted 1 line

...

net/core/neighbour.c static void neigh_proc_update(struct ctl_table *ctl, int write) · line 2853

Quoted 2 lines
net/core/neighbour.c +1 -1
-	struct net *net = p->net;
+	struct net *net = neigh_parms_net(p);

Hey look at that, the interface already existed :-)

Yep. It was just my dumb head that missed that :)

Quoted 2 lines

Applied, thanks Jiri.