]> err.no Git - linux-2.6/blobdiff - net/core/fib_rules.c
[CRYPTO] users: Select ECB/CBC where needed
[linux-2.6] / net / core / fib_rules.c
index 7b2e9bb1a605d2e395657230b7415e21ed2a6b1a..6b0e63cacd93347be11dcf085b2c3774ef4c2534 100644 (file)
@@ -8,7 +8,6 @@
  * Authors:    Thomas Graf <tgraf@suug.ch>
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
@@ -161,9 +160,6 @@ int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
        if (err < 0)
                goto errout;
 
-       if (tb[FRA_IFNAME] && nla_len(tb[FRA_IFNAME]) > IFNAMSIZ)
-               goto errout;
-
        rule = kzalloc(ops->rule_size, GFP_KERNEL);
        if (rule == NULL) {
                err = -ENOMEM;
@@ -177,10 +173,7 @@ int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
                struct net_device *dev;
 
                rule->ifindex = -1;
-               if (nla_strlcpy(rule->ifname, tb[FRA_IFNAME],
-                               IFNAMSIZ) >= IFNAMSIZ)
-                       goto errout_free;
-
+               nla_strlcpy(rule->ifname, tb[FRA_IFNAME], IFNAMSIZ);
                dev = __dev_get_by_name(rule->ifname);
                if (dev)
                        rule->ifindex = dev->ifindex;