netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* iproute2 bug in json output for encap
@ 2023-04-14  8:29 Lars Ekman
  2023-04-14 15:21 ` Stephen Hemminger
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ekman @ 2023-04-14  8:29 UTC (permalink / raw)
  To: netdev

The destination is lost in json printout and replaced by the encap 
destination. The destination can even be ipv6 for an ipv4 route.

Example:

vm-002 ~ # ip route add 10.0.0.0/24 proto 5 dev ip6tnl6 encap ip6 dst 
fd00::192.168.2.221
vm-002 ~ # ip route show proto 5
10.0.0.0/24  encap ip6 id 0 src :: dst fd00::c0a8:2dd hoplimit 0 tc 0 
dev ip6tnl6 scope link
vm-002 ~ # ip -j route show proto 5 | jq
[
   {
     "dst": "fd00::c0a8:2dd",
     "encap": "ip6",
     "id": 0,
     "src": "::",
     "hoplimit": 0,
     "tc": 0,
     "dev": "ip6tnl6",
     "scope": "link",
     "flags": []
   }
]


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-14 17:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-14  8:29 iproute2 bug in json output for encap Lars Ekman
2023-04-14 15:21 ` Stephen Hemminger
2023-04-14 16:12   ` Lars Ekman
2023-04-14 16:26     ` Lars Ekman
2023-04-14 16:44       ` Stephen Hemminger
2023-04-14 17:01       ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).