diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-09-07 14:44:40 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-09-07 14:44:40 +0000 |
commit | 75c35e0f313d58fbbc65169dec13ce19e9886c99 (patch) | |
tree | 5b7add88c47303e6249ae89bf20dc12496dfedf5 /src | |
parent | 4b407f6c3cd7584c308fcd75fd8d2a094a4e8dd1 (diff) | |
download | postgresql-75c35e0f313d58fbbc65169dec13ce19e9886c99.tar.gz postgresql-75c35e0f313d58fbbc65169dec13ce19e9886c99.zip |
Remove check on source address of a statistics packet. Check was broken
by recent IPv6 changes, and since it's redundant with a kernel-level check
anyway, it seems not worth trying to fix it. Per recent discussions.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/postmaster/pgstat.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index aef71fd4967..b0271890821 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -13,7 +13,7 @@ * * Copyright (c) 2001-2003, PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.43 2003/08/12 16:21:18 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.44 2003/09/07 14:44:40 tgl Exp $ * ---------- */ #include "postgres.h" @@ -1591,8 +1591,6 @@ pgstat_recvbuffer(void) int msg_send = 0; /* next send index in buffer */ int msg_recv = 0; /* next receive index */ int msg_have = 0; /* number of bytes stored */ - struct sockaddr_storage fromaddr; - int fromlen; bool overflow = false; /* @@ -1702,10 +1700,8 @@ pgstat_recvbuffer(void) */ if (FD_ISSET(pgStatSock, &rfds)) { - fromlen = sizeof(fromaddr); - len = recvfrom(pgStatSock, (char *) &input_buffer, - sizeof(PgStat_Msg), 0, - (struct sockaddr *) &fromaddr, &fromlen); + len = recv(pgStatSock, (char *) &input_buffer, + sizeof(PgStat_Msg), 0); if (len < 0) { ereport(LOG, @@ -1727,16 +1723,6 @@ pgstat_recvbuffer(void) continue; /* - * The source address of the packet must be our own socket. - * This ensures that only real hackers or our own backends - * tell us something. (This should be redundant with a - * kernel-level check due to having used connect(), but let's - * do it anyway.) - */ - if (memcmp(&fromaddr, &pgStatAddr, fromlen)) - continue; - - /* * O.K. - we accept this message. Copy it to the circular * msgbuffer. */ |