fib6_rules.c (7cbca67c073263c179f605bdbbdc565ab29d801d) fib6_rules.c (3b1e0a655f8eba44ab1ee2a1068d169ccfb853b9)
1/*
2 * net/ipv6/fib6_rules.c IPv6 Routing Policy Rules
3 *
4 * Copyright (C)2003-2006 Helsinki University of Technology
5 * Copyright (C)2003-2006 USAGI/WIDE Project
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as

--- 140 unchanged lines hidden (view full) ---

149 FRA_GENERIC_POLICY,
150};
151
152static int fib6_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
153 struct nlmsghdr *nlh, struct fib_rule_hdr *frh,
154 struct nlattr **tb)
155{
156 int err = -EINVAL;
1/*
2 * net/ipv6/fib6_rules.c IPv6 Routing Policy Rules
3 *
4 * Copyright (C)2003-2006 Helsinki University of Technology
5 * Copyright (C)2003-2006 USAGI/WIDE Project
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as

--- 140 unchanged lines hidden (view full) ---

149 FRA_GENERIC_POLICY,
150};
151
152static int fib6_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
153 struct nlmsghdr *nlh, struct fib_rule_hdr *frh,
154 struct nlattr **tb)
155{
156 int err = -EINVAL;
157 struct net *net = skb->sk->sk_net;
157 struct net *net = sock_net(skb->sk);
158 struct fib6_rule *rule6 = (struct fib6_rule *) rule;
159
160 if (rule->action == FR_ACT_TO_TBL) {
161 if (rule->table == RT6_TABLE_UNSPEC)
162 goto errout;
163
164 if (fib6_new_table(net, rule->table) == NULL) {
165 err = -ENOBUFS;

--- 155 unchanged lines hidden ---
158 struct fib6_rule *rule6 = (struct fib6_rule *) rule;
159
160 if (rule->action == FR_ACT_TO_TBL) {
161 if (rule->table == RT6_TABLE_UNSPEC)
162 goto errout;
163
164 if (fib6_new_table(net, rule->table) == NULL) {
165 err = -ENOBUFS;

--- 155 unchanged lines hidden ---