Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277540
b: refs/heads/master
c: d71314b
h: refs/heads/master
v: v3
  • Loading branch information
Matti Vaittinen authored and David S. Miller committed Nov 14, 2011
1 parent 90189f9 commit 4957372
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: abbd00b82a2771b0460ba2cffdb1343aa827ccde
refs/heads/master: d71314b4ac88637f9ac2770a9f635babdf6f2ff9
13 changes: 11 additions & 2 deletions trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,9 +1230,18 @@ int ip6_route_add(struct fib6_config *cfg)
if (cfg->fc_metric == 0)
cfg->fc_metric = IP6_RT_PRIO_USER;

table = fib6_new_table(net, cfg->fc_table);
err = -ENOBUFS;
if (NULL != cfg->fc_nlinfo.nlh &&
!(cfg->fc_nlinfo.nlh->nlmsg_flags&NLM_F_CREATE)) {
table = fib6_get_table(net, cfg->fc_table);
if (table == NULL) {
printk(KERN_WARNING "IPv6: NLM_F_CREATE should be specified when creating new route\n");
table = fib6_new_table(net, cfg->fc_table);
}
} else {
table = fib6_new_table(net, cfg->fc_table);
}
if (table == NULL) {
err = -ENOBUFS;
goto out;
}

Expand Down

0 comments on commit 4957372

Please sign in to comment.