From: Julian Anastasov Date: Fri, 20 Jul 2012 09:02:08 +0000 (+0300) Subject: ipv4: show pmtu in route list X-Git-Tag: v3.6-rc1~125^2~46 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=521f549097a79dc55e18c3bc752ef2127ad70ac5;p=~emulex%2Finfiniband.git ipv4: show pmtu in route list Override the metrics with rt_pmtu Signed-off-by: Julian Anastasov Signed-off-by: David S. Miller --- diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 9f7ffbe201c..d547f6fae20 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2909,6 +2909,7 @@ static int rt_fill_info(struct net *net, struct nlmsghdr *nlh; unsigned long expires = 0; u32 error; + u32 metrics[RTAX_MAX]; nlh = nlmsg_put(skb, pid, seq, event, sizeof(*r), flags); if (nlh == NULL) @@ -2953,7 +2954,10 @@ static int rt_fill_info(struct net *net, nla_put_be32(skb, RTA_GATEWAY, rt->rt_gateway)) goto nla_put_failure; - if (rtnetlink_put_metrics(skb, dst_metrics_ptr(&rt->dst)) < 0) + memcpy(metrics, dst_metrics_ptr(&rt->dst), sizeof(metrics)); + if (rt->rt_pmtu) + metrics[RTAX_MTU - 1] = rt->rt_pmtu; + if (rtnetlink_put_metrics(skb, metrics) < 0) goto nla_put_failure; if (rt->rt_mark &&