On Tue, Mar 11, 2014 at 04:08:14PM +0100, Michal Kubecek wrote: > +static int fib6_commit_metrics(struct dst_entry *old_dst, struct dst_entry *dst, > + struct nlattr *mx, int mx_len) > +{ > + struct nlattr *nla; > + int remaining; > + u32 *mp; > + > + /* no new metrics and not inheriting an inetpeer with old ones */ > + if (!mx && (!(dst->flags & DST_HOST) || !old_dst || > + dst_metrics_read_only(old_dst))) > + return 0; > + > + mp = dst_metrics_write_ptr(dst); > + if ((dst->flags & DST_HOST) && > + old_dst && !dst_metrics_read_only(old_dst)) > + memset(mp, 0, RTAX_MAX * sizeof(u32)); > + Small question: Wouldn't make it easier if we move the kzalloc/dst_init_metrics part to here in case we aren't a DST_HOST and remove it from ip6_route_add, too? Otherwise (but really just a first look!), it seems ok to me. Thanks, Hannes -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html