]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv6/fib6_rules.c
net: fib_rules: mark arguments to fib_rules_register const and __net_initdata
[net-next-2.6.git] / net / ipv6 / fib6_rules.c
index 5e463c43fcc27a3abdfaf257a0bae134819154ae..35f6949446f0280054badcd3e9370e9e66ed7b4c 100644 (file)
@@ -208,7 +208,6 @@ static int fib6_rule_fill(struct fib_rule *rule, struct sk_buff *skb,
 {
        struct fib6_rule *rule6 = (struct fib6_rule *) rule;
 
-       frh->family = AF_INET6;
        frh->dst_len = rule6->dst.plen;
        frh->src_len = rule6->src.plen;
        frh->tos = rule6->tclass;
@@ -238,8 +237,8 @@ static size_t fib6_rule_nlmsg_payload(struct fib_rule *rule)
               + nla_total_size(16); /* src */
 }
 
-static struct fib_rules_ops fib6_rules_ops_template = {
-       .family                 = AF_INET6,
+static const struct fib_rules_ops __net_initdata fib6_rules_ops_template = {
+       .family                 = FIB_RULES_IPV6,
        .rule_size              = sizeof(struct fib6_rule),
        .addr_size              = sizeof(struct in6_addr),
        .action                 = fib6_rule_action,