Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
e47b93d3
Commit
e47b93d3
authored
Jun 02, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The INET and CIDR types mistakenly compared 198.68.123.0/24 and
198.68.123.0/27 the same when indexing them. D'Arcy
parent
8593e1ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/backend/utils/adt/network.c
src/backend/utils/adt/network.c
+10
-2
No files found.
src/backend/utils/adt/network.c
View file @
e47b93d3
...
...
@@ -3,7 +3,7 @@
* is for IP V4 CIDR notation, but prepared for V6: just
* add the necessary bits where the comments indicate.
*
* $Id: network.c,v 1.
9 1999/05/25 16:12:11
momjian Exp $
* $Id: network.c,v 1.
10 1999/06/02 03:37:15
momjian Exp $
* Jon Postel RIP 16 Oct 1998
*/
...
...
@@ -306,8 +306,16 @@ network_cmp(inet *a1, inet *a2)
{
if
(
ntohl
(
ip_v4addr
(
a1
))
<
ntohl
(
ip_v4addr
(
a2
)))
return
(
-
1
);
else
if
(
ntohl
(
ip_v4addr
(
a1
))
>
ntohl
(
ip_v4addr
(
a2
)))
if
(
ntohl
(
ip_v4addr
(
a1
))
>
ntohl
(
ip_v4addr
(
a2
)))
return
(
1
);
if
(
ip_bits
(
a1
)
<
ip_bits
(
a2
))
return
(
-
1
);
if
(
ip_bits
(
a1
)
>
ip_bits
(
a2
))
return
(
1
);
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment