aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/mac.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-12-16 01:30:49 +0000
committerBruce Momjian <bruce@momjian.us>1999-12-16 01:30:49 +0000
commitd033e17530e106fbe9de918cb5ddee17a2ab60ec (patch)
treeb62c29d4be0e37979834d62b736302910c2d1790 /src/backend/utils/adt/mac.c
parent7585deb0878bca96eee9a3e00fb5726c7725831c (diff)
downloadpostgresql-d033e17530e106fbe9de918cb5ddee17a2ab60ec.tar.gz
postgresql-d033e17530e106fbe9de918cb5ddee17a2ab60ec.zip
Ethernet MAC addresses (macaddr type) are not compared correctly for
equality. The lobits macro is wrong and extracts the wrong set of bits out of the structure. To exhibit the problem: select '000000:000000'::macaddr = '000000:110000'::macaddr ; ?column? -------- t (1 row) Daniel Boyd
Diffstat (limited to 'src/backend/utils/adt/mac.c')
-rw-r--r--src/backend/utils/adt/mac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/mac.c b/src/backend/utils/adt/mac.c
index 28fa20057e2..02fc1863b60 100644
--- a/src/backend/utils/adt/mac.c
+++ b/src/backend/utils/adt/mac.c
@@ -1,7 +1,7 @@
/*
* PostgreSQL type definitions for MAC addresses.
*
- * $Id: mac.c,v 1.13 1999/07/17 20:17:57 momjian Exp $
+ * $Id: mac.c,v 1.14 1999/12/16 01:30:49 momjian Exp $
*/
@@ -132,7 +132,7 @@ manufacturer manufacturers[] = {
((unsigned long)((addr->a<<16)|(addr->b<<8)|(addr->c)))
#define lobits(addr) \
- ((unsigned long)((addr->c<<16)|(addr->e<<8)|(addr->f)))
+ ((unsigned long)((addr->d<<16)|(addr->e<<8)|(addr->f)))
/*
* MAC address reader. Accepts several common notations.