<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nginx.git/src/stream/ngx_stream_geo_module.c, branch release-1.29.4</title>
<subtitle>nginx</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/'/>
<entry>
<title>Geo: the "volatile" parameter.</title>
<updated>2025-10-24T22:06:54+00:00</updated>
<author>
<name>Dmitry Plotnikov</name>
<email>d.plotnikov@f5.com</email>
</author>
<published>2025-10-21T19:48:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=ac72ca60c773a9ab6f3c6344ac1f2c03ca2b3201'/>
<id>ac72ca60c773a9ab6f3c6344ac1f2c03ca2b3201</id>
<content type='text'>
Similar to map's volatile parameter, creates a non-cacheable geo variable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to map's volatile parameter, creates a non-cacheable geo variable.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed undefined behaviour with IPv4-mapped IPv6 addresses.</title>
<updated>2024-03-18T13:14:30+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2024-03-18T13:14:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=3d5a356abb4f06b0f103290bd31a4c146233956b'/>
<id>3d5a356abb4f06b0f103290bd31a4c146233956b</id>
<content type='text'>
Previously, it could result when left-shifting signed integer due to implicit
integer promotion, such that the most significant bit appeared on the sign bit.

In practice, though, this results in the same left value as with an explicit
cast, at least on known compilers, such as GCC and Clang.  The reason is that
in_addr_t, which is equivalent to uint32_t and same as "unsigned int" in ILP32
and LP64 data type models, has the same type width as the intermediate after
integer promotion, so there's no side effects such as sign-extension.  This
explains why adding an explicit cast does not change object files in practice.

Found with UndefinedBehaviorSanitizer (shift).

Based on a patch by Piotr Sikora.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, it could result when left-shifting signed integer due to implicit
integer promotion, such that the most significant bit appeared on the sign bit.

In practice, though, this results in the same left value as with an explicit
cast, at least on known compilers, such as GCC and Clang.  The reason is that
in_addr_t, which is equivalent to uint32_t and same as "unsigned int" in ILP32
and LP64 data type models, has the same type width as the intermediate after
integer promotion, so there's no side effects such as sign-extension.  This
explains why adding an explicit cast does not change object files in practice.

Found with UndefinedBehaviorSanitizer (shift).

Based on a patch by Piotr Sikora.
</pre>
</div>
</content>
</entry>
<entry>
<title>Geo: fixed uninitialized memory access.</title>
<updated>2024-03-14T14:37:20+00:00</updated>
<author>
<name>Piotr Sikora</name>
<email>piotr@aviatrix.com</email>
</author>
<published>2024-03-14T14:37:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=d3d64cacb3ce96477d354fe17d3b5c6e348f933a'/>
<id>d3d64cacb3ce96477d354fe17d3b5c6e348f933a</id>
<content type='text'>
While copying ngx_http_variable_value_t structures to geo binary base
in ngx_http_geo_copy_values(), and similarly in the stream module,
uninitialized parts of these structures are copied as well.  These
include the "escape" field and possible holes.  Calculating crc32 of
this data triggers uninitialized memory access.

Found with MemorySanitizer.

Signed-off-by: Piotr Sikora &lt;piotr@aviatrix.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While copying ngx_http_variable_value_t structures to geo binary base
in ngx_http_geo_copy_values(), and similarly in the stream module,
uninitialized parts of these structures are copied as well.  These
include the "escape" field and possible holes.  Calculating crc32 of
this data triggers uninitialized memory access.

Found with MemorySanitizer.

Signed-off-by: Piotr Sikora &lt;piotr@aviatrix.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Geo: fixed handling of AF_UNIX client addresses (ticket #1684).</title>
<updated>2018-12-14T15:11:06+00:00</updated>
<author>
<name>Maxim Dounin</name>
<email>mdounin@mdounin.ru</email>
</author>
<published>2018-12-14T15:11:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=ce4a23d144762cfa27c0e4b13f74cada2f7486a8'/>
<id>ce4a23d144762cfa27c0e4b13f74cada2f7486a8</id>
<content type='text'>
Previously, AF_UNIX client addresses were handled as AF_INET, leading
to unexpected results.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, AF_UNIX client addresses were handled as AF_INET, leading
to unexpected results.
</pre>
</div>
</content>
</entry>
<entry>
<title>Geo: fixed indentation.</title>
<updated>2018-02-21T14:26:00+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2018-02-21T14:26:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=b3b4a98a5c24d1d0a155f832182b4a2ea1de0984'/>
<id>b3b4a98a5c24d1d0a155f832182b4a2ea1de0984</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Geo: optimized configuration parser.</title>
<updated>2018-02-21T12:50:43+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2018-02-21T12:50:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=7a45918e0bb5502cda940565de726a13140e92cf'/>
<id>7a45918e0bb5502cda940565de726a13140e92cf</id>
<content type='text'>
If the geo block parser has failed, doing more things is pointless.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the geo block parser has failed, doing more things is pointless.
</pre>
</div>
</content>
</entry>
<entry>
<title>Geo: fixed memory allocation error handling (closes #1482).</title>
<updated>2018-02-21T12:50:42+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2018-02-21T12:50:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=f98a8c4db622223485ad5f175c79ecc0695ed5cc'/>
<id>f98a8c4db622223485ad5f175c79ecc0695ed5cc</id>
<content type='text'>
If during configuration parsing of the geo directive the memory
allocation has failed, pool used to parse configuration inside
the block, and sometimes the temporary pool were not destroyed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If during configuration parsing of the geo directive the memory
allocation has failed, pool used to parse configuration inside
the block, and sometimes the temporary pool were not destroyed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed calls to ngx_open_file() in certain places.</title>
<updated>2017-08-09T12:03:27+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2017-08-09T12:03:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=b986b4314bb4f8fdcbcfe93c89a659d3d18691bc'/>
<id>b986b4314bb4f8fdcbcfe93c89a659d3d18691bc</id>
<content type='text'>
Pass NGX_FILE_OPEN to ngx_open_file() to fix "The parameter is incorrect"
error on win32 when using the ssl_session_ticket_key directive or loading
a binary geo base.  On UNIX, this change is a no-op.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pass NGX_FILE_OPEN to ngx_open_file() to fix "The parameter is incorrect"
error on win32 when using the ssl_session_ticket_key directive or loading
a binary geo base.  On UNIX, this change is a no-op.
</pre>
</div>
</content>
</entry>
<entry>
<title>Style.</title>
<updated>2017-08-09T11:59:46+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2017-08-09T11:59:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=32c7bd5102571ec20e45f620d2916e612e3b2016'/>
<id>32c7bd5102571ec20e45f620d2916e612e3b2016</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Geo: fixed warnings when removing nonexistent ranges.</title>
<updated>2016-08-23T12:59:42+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@nginx.com</email>
</author>
<published>2016-08-23T12:59:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/nginx.git/commit/?id=9208875db1d47d7bdc7b7b6583ea3b3b04b33a01'/>
<id>9208875db1d47d7bdc7b7b6583ea3b3b04b33a01</id>
<content type='text'>
geo $geo {
    ranges;

    10.0.0.0-10.0.0.255 test;

    delete 10.0.1.0-10.0.1.255;     # should warn

    delete 10.0.0.0-10.0.0.255;
    delete 10.0.0.0-10.0.0.255;     # should warn
}
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
geo $geo {
    ranges;

    10.0.0.0-10.0.0.255 test;

    delete 10.0.1.0-10.0.1.255;     # should warn

    delete 10.0.0.0-10.0.0.255;
    delete 10.0.0.0-10.0.0.255;     # should warn
}
</pre>
</div>
</content>
</entry>
</feed>
