[sr-dev] IPv4 and IPv6 binary comparison
Iñaki Baz Castillo
ibc at aliax.net
Thu Apr 28 15:02:38 CEST 2011
2011/4/28 Klaus Darilion <klaus.mailinglists at pernau.at>:
> but it works. E.g
>
> INVITE sip:0900123455 at 1.2.3.004
Right. In RFC 3261 that is a valid IPv4, but RFC 5954 updates RFC 3261
BNF grammar.
> works with Kamailio. Thus when making string based checks you do not
> have to rely on valid or not. Thus, I never would do IPv4 comparisons
> with "string" comparisons if one of the values is user provided, e.g.
>
> if ($rd == "1.2.3.4") {
> sl_send_reply("403","not allowed");
> exit;
> }
>
> would fail to detect the above request.
Right.
--
Iñaki Baz Castillo
<ibc at aliax.net>
More information about the sr-dev
mailing list