fib6_rules.c (30596ec32e2cd141d73ee8701386887def9e98c0) fib6_rules.c (b16fb418b1bf2a9f14d5d2a4fe29bde1f5550b37)
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

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

240}
241
242static const struct nla_policy fib6_rule_policy[FRA_MAX+1] = {
243 FRA_GENERIC_POLICY,
244};
245
246static int fib6_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
247 struct fib_rule_hdr *frh,
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

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

240}
241
242static const struct nla_policy fib6_rule_policy[FRA_MAX+1] = {
243 FRA_GENERIC_POLICY,
244};
245
246static int fib6_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
247 struct fib_rule_hdr *frh,
248 struct nlattr **tb)
248 struct nlattr **tb,
249 struct netlink_ext_ack *extack)
249{
250 int err = -EINVAL;
251 struct net *net = sock_net(skb->sk);
252 struct fib6_rule *rule6 = (struct fib6_rule *) rule;
253
254 if (rule->action == FR_ACT_TO_TBL && !rule->l3mdev) {
250{
251 int err = -EINVAL;
252 struct net *net = sock_net(skb->sk);
253 struct fib6_rule *rule6 = (struct fib6_rule *) rule;
254
255 if (rule->action == FR_ACT_TO_TBL && !rule->l3mdev) {
255 if (rule->table == RT6_TABLE_UNSPEC)
256 if (rule->table == RT6_TABLE_UNSPEC) {
257 NL_SET_ERR_MSG(extack, "Invalid table");
256 goto errout;
258 goto errout;
259 }
257
258 if (fib6_new_table(net, rule->table) == NULL) {
259 err = -ENOBUFS;
260 goto errout;
261 }
262 }
263
264 if (frh->src_len)

--- 147 unchanged lines hidden ---
260
261 if (fib6_new_table(net, rule->table) == NULL) {
262 err = -ENOBUFS;
263 goto errout;
264 }
265 }
266
267 if (frh->src_len)

--- 147 unchanged lines hidden ---