]> git.ipfire.org Git - thirdparty/iproute2.git/commit
vxlan: make option printing more consistent
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 23 May 2023 16:57:15 +0000 (09:57 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 30 May 2023 19:32:22 +0000 (12:32 -0700)
commit1215e9d3862387353d8672296cb4c6c16e8cbb72
tree6981783dcf0ec55647d1f5ebc8e6a1fd58fcf016
parenta183eba71bc256957b2342021a030e964665eac0
vxlan: make option printing more consistent

Add new helper function print_bool_opt() which prints
with no prefix and use it for vxlan options.

If the option matches the expected default value,
it is not printed if in non JSON mode unless the details
setting is repeated.

Use a table for the vxlan options. This will change
the order of the printing of options.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
include/json_print.h
ip/iplink_vxlan.c
lib/json_print.c