aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/fib_rules.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-25 13:26:21 -0400
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-25 15:39:55 -0400
commit3b1e0a655f8eba44ab1ee2a1068d169ccfb853b9 (patch)
tree09edb35f32ebcfb1b4dad904425128a110ef16ee /net/core/fib_rules.c
parentc346dca10840a874240c78efe3f39acf4312a1f2 (diff)
[NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS.
Introduce per-sock inlines: sock_net(), sock_net_set() and per-inet_timewait_sock inlines: twsk_net(), twsk_net_set(). Without CONFIG_NET_NS, no namespace other than &init_net exists. Let's explicitly define them to help compiler optimizations. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/core/fib_rules.c')
-rw-r--r--net/core/fib_rules.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 942be93a2eb0..540c07283e31 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -214,7 +214,7 @@ errout:
214 214
215static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) 215static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
216{ 216{
217 struct net *net = skb->sk->sk_net; 217 struct net *net = sock_net(skb->sk);
218 struct fib_rule_hdr *frh = nlmsg_data(nlh); 218 struct fib_rule_hdr *frh = nlmsg_data(nlh);
219 struct fib_rules_ops *ops = NULL; 219 struct fib_rules_ops *ops = NULL;
220 struct fib_rule *rule, *r, *last = NULL; 220 struct fib_rule *rule, *r, *last = NULL;
@@ -352,7 +352,7 @@ errout:
352 352
353static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) 353static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
354{ 354{
355 struct net *net = skb->sk->sk_net; 355 struct net *net = sock_net(skb->sk);
356 struct fib_rule_hdr *frh = nlmsg_data(nlh); 356 struct fib_rule_hdr *frh = nlmsg_data(nlh);
357 struct fib_rules_ops *ops = NULL; 357 struct fib_rules_ops *ops = NULL;
358 struct fib_rule *rule, *tmp; 358 struct fib_rule *rule, *tmp;
@@ -534,7 +534,7 @@ skip:
534 534
535static int fib_nl_dumprule(struct sk_buff *skb, struct netlink_callback *cb) 535static int fib_nl_dumprule(struct sk_buff *skb, struct netlink_callback *cb)
536{ 536{
537 struct net *net = skb->sk->sk_net; 537 struct net *net = sock_net(skb->sk);
538 struct fib_rules_ops *ops; 538 struct fib_rules_ops *ops;
539 int idx = 0, family; 539 int idx = 0, family;
540 540