forked from extern/shorewall_code
Use 'ip -s xfrm' to dump the SPD and SAD
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
b3b637d663
commit
03a9b92a14
@ -1583,6 +1583,19 @@ show_status() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Don't dump empty SPD entries
|
||||||
|
#
|
||||||
|
spd_filter()
|
||||||
|
{
|
||||||
|
awk \
|
||||||
|
'BEGIN { skip=0; }; \
|
||||||
|
/^src/ { skip=0; }; \
|
||||||
|
/^src 0.0.0.0\/0/ { skip=1; }; \
|
||||||
|
/^src ::\/0/ { skip=1; }; \
|
||||||
|
{ if ( skip == 0 ) print; };'
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Dump Command Executor
|
# Dump Command Executor
|
||||||
#
|
#
|
||||||
@ -1733,12 +1746,10 @@ do_dump_command() {
|
|||||||
heading "Events"
|
heading "Events"
|
||||||
show_events
|
show_events
|
||||||
|
|
||||||
if qt mywhich setkey; then
|
heading "PFKEY SPD"
|
||||||
heading "PFKEY SPD"
|
$IP -s xfrm policy | spd_filter
|
||||||
setkey -DP
|
heading "PFKEY SAD"
|
||||||
heading "PFKEY SAD"
|
$IP -s -$g_family xfrm state | egrep -v '[[:space:]]+(auth-trunc|enc )' # Don't divulge the keys
|
||||||
setkey -D | grep -Ev '^[[:space:]](A:|E:)' # Don't divulge the keys
|
|
||||||
fi
|
|
||||||
|
|
||||||
heading "/proc"
|
heading "/proc"
|
||||||
show_proc /proc/version
|
show_proc /proc/version
|
||||||
|
Loading…
Reference in New Issue
Block a user