]> git.proxmox.com Git - mirror_iproute2.git/commit - ip/ipxfrm.c
xfrm: Fix -o (oneline) being broken in xfrm and correct mark radix
authorphilipp@redfish-solutions.com <philipp@redfish-solutions.com>
Thu, 19 Mar 2015 19:54:28 +0000 (13:54 -0600)
committerStephen Hemminger <shemming@brocade.com>
Tue, 24 Mar 2015 22:01:20 +0000 (15:01 -0700)
commit6f4cad912082998bc2a44316af5550eaf260605a
tree8a04544e3517b5779b7a17a2716dfeb80c6b33dc
parent42ecedd4bae534fc688194a795eb4548c6530cda
xfrm: Fix -o (oneline) being broken in xfrm and correct mark radix

Don't insert newline in -o (oneline) mode; print mark as hex.

Oneline mode is supposed to force all output to be on oneline and
machine-parsable, but this isn't the case for "ip xfrm" as shown:

% ip -o xfrm monitor
...
src 0.0.0.0/0 dst 0.0.0.0/0 \   dir out priority 2051 ptype main \  mark -1879048191/0xffffffff
    tmpl src 203.0.130.10 dst 198.51.130.30\        proto esp reqid 16384 mode tunnel\
...

as that's 2 lines, not one. Also, the "mark" is shown in signed
decimal, but the mask is in hex. This is confusing: let's use
hex for both.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
ip/ipxfrm.c