]> Pileus Git - ~andy/linux/blobdiff - net/ipv4/fib_rules.c
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
[~andy/linux] / net / ipv4 / fib_rules.c
index 3b7affd5cb3bed1bef3925d0e49ecc4b57fa4d2a..19274d01afa4a36c3777b5ff34816fa63783734a 100644 (file)
@@ -54,14 +54,14 @@ u32 fib_rules_tclass(struct fib_result *res)
 }
 #endif
 
-int fib_lookup(struct flowi *flp, struct fib_result *res)
+int fib_lookup(struct net *net, struct flowi *flp, struct fib_result *res)
 {
        struct fib_lookup_arg arg = {
                .result = res,
        };
        int err;
 
-       err = fib_rules_lookup(init_net.ipv4.rules_ops, flp, 0, &arg);
+       err = fib_rules_lookup(net->ipv4.rules_ops, flp, 0, &arg);
        res->r = arg.rule;
 
        return err;
@@ -91,7 +91,7 @@ static int fib4_rule_action(struct fib_rule *rule, struct flowi *flp,
                goto errout;
        }
 
-       if ((tbl = fib_get_table(&init_net, rule->table)) == NULL)
+       if ((tbl = fib_get_table(rule->fr_net, rule->table)) == NULL)
                goto errout;
 
        err = tbl->tb_lookup(tbl, flp, (struct fib_result *) arg->result);
@@ -102,16 +102,6 @@ errout:
 }
 
 
-void fib_select_default(const struct flowi *flp, struct fib_result *res)
-{
-       if (res->r && res->r->action == FR_ACT_TO_TBL &&
-           FIB_RES_GW(*res) && FIB_RES_NH(*res).nh_scope == RT_SCOPE_LINK) {
-               struct fib_table *tb;
-               if ((tb = fib_get_table(&init_net, res->r->table)) != NULL)
-                       tb->tb_select_default(tb, flp, res);
-       }
-}
-
 static int fib4_rule_match(struct fib_rule *rule, struct flowi *fl, int flags)
 {
        struct fib4_rule *r = (struct fib4_rule *) rule;