net/ipv6: Fix misuse of proc_dointvec "skip_notify_on_dev_down"
[linux-2.6-microblaze.git] / net / ipv6 / route.c
index 0f60eb3..aade636 100644 (file)
@@ -3184,7 +3184,7 @@ static struct fib6_info *ip6_route_info_create(struct fib6_config *cfg,
 
        rt->fib6_table = table;
        rt->fib6_metric = cfg->fc_metric;
-       rt->fib6_type = cfg->fc_type;
+       rt->fib6_type = cfg->fc_type ? : RTN_UNICAST;
        rt->fib6_flags = cfg->fc_flags & ~RTF_GATEWAY;
 
        ipv6_addr_prefix(&rt->fib6_dst.addr, &cfg->fc_dst, cfg->fc_dst_len);
@@ -5281,7 +5281,7 @@ static struct ctl_table ipv6_route_table_template[] = {
                .data           =       &init_net.ipv6.sysctl.skip_notify_on_dev_down,
                .maxlen         =       sizeof(int),
                .mode           =       0644,
-               .proc_handler   =       proc_dointvec,
+               .proc_handler   =       proc_dointvec_minmax,
                .extra1         =       &zero,
                .extra2         =       &one,
        },