[DECNET]: Fix build regressions.
authorDavid S. Miller <davem@sunset.davemloft.net>
Mon, 13 Nov 2006 07:02:01 +0000 (23:02 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 3 Dec 2006 05:22:15 +0000 (21:22 -0800)
Spotted by Arnaldo.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/decnet/dn_rules.c
net/decnet/dn_table.c

index b7dfd04a9638b2f4bc25b9eedd975888f66e9612..e32d0c3d5a96a3e3ec5b040ef4b1d365e68b4125 100644 (file)
@@ -241,12 +241,6 @@ static u32 dn_fib_rule_default_pref(void)
        return 0;
 }
 
-static size_t dn_fib_rule_nlmsg_payload(struct fib_rule *rule)
-{
-       return nla_total_size(2) /* dst */
-              + nla_total_size(2); /* src */
-}
-
 int dn_fib_dump_rules(struct sk_buff *skb, struct netlink_callback *cb)
 {
        return fib_rules_dump(skb, cb, AF_DECnet);
index e74b744254ab0ebb7041155d0daf051c5b66c2c4..9ce58c24a8d3d4fd02c9ce44c2759f2cbe626bb6 100644 (file)
@@ -265,7 +265,7 @@ static int dn_fib_nh_match(struct rtmsg *r, struct nlmsghdr *nlh, struct dn_kern
 
 static inline size_t dn_fib_nlmsg_size(struct dn_fib_info *fi)
 {
-       size_t payload = NLMSG_ALIGN(struct rtmsg)
+       size_t payload = NLMSG_ALIGN(sizeof(struct rtmsg))
                         + nla_total_size(4) /* RTA_TABLE */
                         + nla_total_size(2) /* RTA_DST */
                         + nla_total_size(4); /* RTA_PRIORITY */
@@ -361,7 +361,7 @@ static void dn_rtmsg_fib(int event, struct dn_fib_node *f, int z, u32 tb_id,
         u32 pid = req ? req->pid : 0;
        int err = -ENOBUFS;
 
-        skb = nlmsg_new(dn_fib_nlmsg_size(DN_FIB_INFO(f), GFP_KERNEL));
+        skb = nlmsg_new(dn_fib_nlmsg_size(DN_FIB_INFO(f)), GFP_KERNEL);
         if (skb == NULL)
                goto errout;