aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2012-07-20 05:02:08 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-20 14:16:49 -0400
commit521f549097a79dc55e18c3bc752ef2127ad70ac5 (patch)
tree2098c3d66dd5011476e20d69946ff0d7b0fe272c /net/ipv4
parente4bce0f288bafd8505ba5ce9c5284a4478f1b725 (diff)
ipv4: show pmtu in route list
Override the metrics with rt_pmtu Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/route.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 9f7ffbe201c9..d547f6fae20d 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2909,6 +2909,7 @@ static int rt_fill_info(struct net *net,
2909 struct nlmsghdr *nlh; 2909 struct nlmsghdr *nlh;
2910 unsigned long expires = 0; 2910 unsigned long expires = 0;
2911 u32 error; 2911 u32 error;
2912 u32 metrics[RTAX_MAX];
2912 2913
2913 nlh = nlmsg_put(skb, pid, seq, event, sizeof(*r), flags); 2914 nlh = nlmsg_put(skb, pid, seq, event, sizeof(*r), flags);
2914 if (nlh == NULL) 2915 if (nlh == NULL)
@@ -2953,7 +2954,10 @@ static int rt_fill_info(struct net *net,
2953 nla_put_be32(skb, RTA_GATEWAY, rt->rt_gateway)) 2954 nla_put_be32(skb, RTA_GATEWAY, rt->rt_gateway))
2954 goto nla_put_failure; 2955 goto nla_put_failure;
2955 2956
2956 if (rtnetlink_put_metrics(skb, dst_metrics_ptr(&rt->dst)) < 0) 2957 memcpy(metrics, dst_metrics_ptr(&rt->dst), sizeof(metrics));
2958 if (rt->rt_pmtu)
2959 metrics[RTAX_MTU - 1] = rt->rt_pmtu;
2960 if (rtnetlink_put_metrics(skb, metrics) < 0)
2957 goto nla_put_failure; 2961 goto nla_put_failure;
2958 2962
2959 if (rt->rt_mark && 2963 if (rt->rt_mark &&