api: fix ipsec custom_dump function