]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/netfilter/ipvs/ip_vs_ctl.c
vlan: allow creating vlan when real device is not up
[net-next-2.6.git] / net / netfilter / ipvs / ip_vs_ctl.c
index e01061f49cdc644b0fe99d48457795458f55aa91..2d24d81474ce04826b680a49ca53696680499be4 100644 (file)
@@ -3231,7 +3231,7 @@ static int ip_vs_genl_get_cmd(struct sk_buff *skb, struct genl_info *info)
        }
 
        genlmsg_end(msg, reply);
-       ret = genlmsg_unicast(msg, info->snd_pid);
+       ret = genlmsg_reply(msg, info);
        goto out;
 
 nla_put_failure:
@@ -3345,22 +3345,8 @@ static struct genl_ops ip_vs_genl_ops[] __read_mostly = {
 
 static int __init ip_vs_genl_register(void)
 {
-       int ret, i;
-
-       ret = genl_register_family(&ip_vs_genl_family);
-       if (ret)
-               return ret;
-
-       for (i = 0; i < ARRAY_SIZE(ip_vs_genl_ops); i++) {
-               ret = genl_register_ops(&ip_vs_genl_family, &ip_vs_genl_ops[i]);
-               if (ret)
-                       goto err_out;
-       }
-       return 0;
-
-err_out:
-       genl_unregister_family(&ip_vs_genl_family);
-       return ret;
+       return genl_register_family_with_ops(&ip_vs_genl_family,
+               ip_vs_genl_ops, ARRAY_SIZE(ip_vs_genl_ops));
 }
 
 static void ip_vs_genl_unregister(void)