<p>I looked into the existing code of the function create_ipsec_tunnel(..)</p>
<p>Are you sure that the "return 0" in the error cases is correct? Should it not be -1, as in the one case in the bottom of the function? If yes - then it makes probably sense to combine them all into one "goto error" case.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/2114?email_source=notifications&email_token=ABO7UZLLJJI7ZZISBV5WCOLQRL5W5A5CNFSM4JHBWCG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECYJLVI#issuecomment-548443605">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZIGI5CI337TIEV2TNLQRL5W5ANCNFSM4JHBWCGQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZNAGQCPRQK37AAOQMDQRL5W5A5CNFSM4JHBWCG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECYJLVI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/2114?email_source=notifications\u0026email_token=ABO7UZLLJJI7ZZISBV5WCOLQRL5W5A5CNFSM4JHBWCG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECYJLVI#issuecomment-548443605",
"url": "https://github.com/kamailio/kamailio/pull/2114?email_source=notifications\u0026email_token=ABO7UZLLJJI7ZZISBV5WCOLQRL5W5A5CNFSM4JHBWCG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECYJLVI#issuecomment-548443605",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>