]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/core/fib_rules.c
[NETNS]: Process FIB rule action in the context of the namespace.
[karo-tx-linux.git] / net / core / fib_rules.c
index 3cd4f13413f64f4d92b9a972362442bcbfe29ac2..42ccaf5b85097f43842a9e394dbc082795e80b30 100644 (file)
@@ -29,6 +29,7 @@ int fib_default_rule_add(struct fib_rules_ops *ops,
        r->pref = pref;
        r->table = table;
        r->flags = flags;
+       r->fr_net = ops->fro_net;
 
        /* The lock is not required here, the list in unreacheable
         * at the moment this function is called */
@@ -242,6 +243,7 @@ static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
                err = -ENOMEM;
                goto errout;
        }
+       rule->fr_net = net;
 
        if (tb[FRA_PRIORITY])
                rule->pref = nla_get_u32(tb[FRA_PRIORITY]);