<p></p>
<p><b>@riccardv</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/kamailio/kamailio/pull/2731#discussion_r629325968">src/modules/ims_ipsec_pcscf/ipsec.c</a>:</p>
<pre style='color:#555'>> @@ -100,8 +100,15 @@ static void string_to_key(char* dst, const str key_string)
     }
 }
 
+static uint choose_nlmsg_seq (void)
</pre>
<p>Hi <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/henningw/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/henningw">@henningw</a> ,<br>
I choose the 1 micro seconds granulation due to the commit comment:<br>
"improve nlmsg_seq choice for concurrent multi UEs Registrations at same time"</p>
<p>The reason is the previous choice of time(NULL) return a time value on seconds and it can be too large in presence of multiple UE access in the same time. In high load condition it can be happens.<br>
IPsec Security Association must have this parameter as a unique identifier, since kamailio can be configured to listen on single local ip:port for IPsec, it can be a problem, resulting in a failure on activation of SA, and then a failure on VoLTE SIP REGISTRATION.</p>
<p>A time based choice is a good choice, but 1 second is not enough, so I propose the choice of 1 micro second granularity that can be protect the registrations in a reasonable way.</p>
<p>Regarding other platforms that don't have the funtion, feel free to add a pre processor condition on the function</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/2731#discussion_r629325968">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZNENHVH62ZGFQX5FJ3TM7IEJANCNFSM44PQXWGQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZOMMCUZIXN7TZ4V3GLTM7IEJA5CNFSM44PQXWG2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOE4JZ6OI.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/2731#discussion_r629325968",
"url": "https://github.com/kamailio/kamailio/pull/2731#discussion_r629325968",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>