aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/dn_rules.c6
-rw-r--r--net/decnet/dn_table.c4
2 files changed, 2 insertions, 8 deletions
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c
index b7dfd04a9638..e32d0c3d5a96 100644
--- a/net/decnet/dn_rules.c
+++ b/net/decnet/dn_rules.c
@@ -241,12 +241,6 @@ static u32 dn_fib_rule_default_pref(void)
241 return 0; 241 return 0;
242} 242}
243 243
244static size_t dn_fib_rule_nlmsg_payload(struct fib_rule *rule)
245{
246 return nla_total_size(2) /* dst */
247 + nla_total_size(2); /* src */
248}
249
250int dn_fib_dump_rules(struct sk_buff *skb, struct netlink_callback *cb) 244int dn_fib_dump_rules(struct sk_buff *skb, struct netlink_callback *cb)
251{ 245{
252 return fib_rules_dump(skb, cb, AF_DECnet); 246 return fib_rules_dump(skb, cb, AF_DECnet);
diff --git a/net/decnet/dn_table.c b/net/decnet/dn_table.c
index e74b744254ab..9ce58c24a8d3 100644
--- a/net/decnet/dn_table.c
+++ b/net/decnet/dn_table.c
@@ -265,7 +265,7 @@ static int dn_fib_nh_match(struct rtmsg *r, struct nlmsghdr *nlh, struct dn_kern
265 265
266static inline size_t dn_fib_nlmsg_size(struct dn_fib_info *fi) 266static inline size_t dn_fib_nlmsg_size(struct dn_fib_info *fi)
267{ 267{
268 size_t payload = NLMSG_ALIGN(struct rtmsg) 268 size_t payload = NLMSG_ALIGN(sizeof(struct rtmsg))
269 + nla_total_size(4) /* RTA_TABLE */ 269 + nla_total_size(4) /* RTA_TABLE */
270 + nla_total_size(2) /* RTA_DST */ 270 + nla_total_size(2) /* RTA_DST */
271 + nla_total_size(4); /* RTA_PRIORITY */ 271 + 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,
361 u32 pid = req ? req->pid : 0; 361 u32 pid = req ? req->pid : 0;
362 int err = -ENOBUFS; 362 int err = -ENOBUFS;
363 363
364 skb = nlmsg_new(dn_fib_nlmsg_size(DN_FIB_INFO(f), GFP_KERNEL)); 364 skb = nlmsg_new(dn_fib_nlmsg_size(DN_FIB_INFO(f)), GFP_KERNEL);
365 if (skb == NULL) 365 if (skb == NULL)
366 goto errout; 366 goto errout;
367 367