Commit 521f5490 authored by Julian Anastasov's avatar Julian Anastasov Committed by David S. Miller

ipv4: show pmtu in route list

Override the metrics with rt_pmtu
Signed-off-by: default avatarJulian Anastasov <ja@ssi.bg>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e4bce0f2
...@@ -2909,6 +2909,7 @@ static int rt_fill_info(struct net *net, ...@@ -2909,6 +2909,7 @@ static int rt_fill_info(struct net *net,
struct nlmsghdr *nlh; struct nlmsghdr *nlh;
unsigned long expires = 0; unsigned long expires = 0;
u32 error; u32 error;
u32 metrics[RTAX_MAX];
nlh = nlmsg_put(skb, pid, seq, event, sizeof(*r), flags); nlh = nlmsg_put(skb, pid, seq, event, sizeof(*r), flags);
if (nlh == NULL) if (nlh == NULL)
...@@ -2953,7 +2954,10 @@ static int rt_fill_info(struct net *net, ...@@ -2953,7 +2954,10 @@ static int rt_fill_info(struct net *net,
nla_put_be32(skb, RTA_GATEWAY, rt->rt_gateway)) nla_put_be32(skb, RTA_GATEWAY, rt->rt_gateway))
goto nla_put_failure; 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; goto nla_put_failure;
if (rt->rt_mark && if (rt->rt_mark &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment