aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet/dn_fib.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/decnet/dn_fib.c')
-rw-r--r--net/decnet/dn_fib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c
index 9e885f180b60..65a8cd7891fe 100644
--- a/net/decnet/dn_fib.c
+++ b/net/decnet/dn_fib.c
@@ -302,11 +302,12 @@ struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r, struct dn_kern_rta
302 struct rtattr *attr = RTA_DATA(rta->rta_mx); 302 struct rtattr *attr = RTA_DATA(rta->rta_mx);
303 303
304 while(RTA_OK(attr, attrlen)) { 304 while(RTA_OK(attr, attrlen)) {
305 unsigned flavour = attr->rta_type; 305 unsigned int flavour = attr->rta_type;
306
306 if (flavour) { 307 if (flavour) {
307 if (flavour > RTAX_MAX) 308 if (flavour > RTAX_MAX)
308 goto err_inval; 309 goto err_inval;
309 fi->fib_metrics[flavour-1] = *(unsigned*)RTA_DATA(attr); 310 fi->fib_metrics[flavour-1] = *(unsigned int *)RTA_DATA(attr);
310 } 311 }
311 attr = RTA_NEXT(attr, attrlen); 312 attr = RTA_NEXT(attr, attrlen);
312 } 313 }