The most common trigger of these errors is that the
config option hasn't been enable wich would make the
functionality available. Therefore returning EOPNOTSUPP
gives a better idea on what is going wrong.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
 
        type = nlh->nlmsg_type;
        if (type > RTM_MAX)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        type -= RTM_BASE;
 
 
                dumpit = rtnl_get_dumpit(family, type);
                if (dumpit == NULL)
-                       return -EINVAL;
+                       return -EOPNOTSUPP;
 
                return netlink_dump_start(rtnl, skb, nlh, dumpit, NULL);
        }
 
        doit = rtnl_get_doit(family, type);
        if (doit == NULL)
-               return -EINVAL;
+               return -EOPNOTSUPP;
 
        return doit(skb, nlh, (void *)&rta_buf[0]);
 }