]> git.proxmox.com Git - mirror_iproute2.git/commit
tc: jsonify nat action
authorKeara Leibovitz <kleib@mojatatu.com>
Mon, 18 Jun 2018 18:57:49 +0000 (14:57 -0400)
committerDavid Ahern <dsahern@gmail.com>
Wed, 20 Jun 2018 17:20:34 +0000 (10:20 -0700)
commit4757a54799de55e4f0d795b63cdb65a016598310
treec66554d95bce2e1d05d6955c5d9151fcb677c44d
parent2ecb61a0c2ceecbbb6ea5325a1770af9573b6953
tc: jsonify nat action

Add json output support for nat action

Example output:

~$ $TC actions add action nat egress 10.10.10.1 20.20.20.2 index 2
~$ $TC actions add action nat ingress 100.100.100.1/32 200.200.200.2 \
continue index 99
~$ $TC -j actions ls action nat

[{
"total acts": 2
}, {
"actions": [{
"order": 0,
"type": "nat",
"direction": "egress",
"old_addr": "10.10.10.1/32",
"new_addr": "20.20.20.2",
"control_action": {
"type": "pass"
},
"index": 2,
"ref": 1,
"bind": 0
}, {
"order": 1,
"type": "nat",
"direction": "ingress",
"old_addr": "100.100.100.1/32",
"new_addr": "200.200.200.2",
"control_action": {
"type": "continue"
},
"index": 99,
"ref": 1,
"bind": 0
}]
}]

Signed-off-by: Keara Leibovitz <kleib@mojatatu.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
tc/m_nat.c