Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd033e17

Browse files
committed
Ethernet MAC addresses (macaddr type) are not compared correctly for
equality. The lobits macro is wrong and extracts the wrong set ofbits out of the structure.To exhibit the problem:select '000000:000000'::macaddr = '000000:110000'::macaddr ;?column?--------t(1 row)Daniel Boyd
1 parent7585deb commitd033e17

File tree

1 file changed

+2
-2
lines changed
  • src/backend/utils/adt

1 file changed

+2
-2
lines changed

‎src/backend/utils/adt/mac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
*PostgreSQL type definitions for MAC addresses.
33
*
4-
*$Id: mac.c,v 1.13 1999/07/17 20:17:57 momjian Exp $
4+
*$Id: mac.c,v 1.14 1999/12/16 01:30:49 momjian Exp $
55
*/
66

77

@@ -132,7 +132,7 @@ manufacturer manufacturers[] = {
132132
((unsigned long)((addr->a<<16)|(addr->b<<8)|(addr->c)))
133133

134134
#definelobits(addr) \
135-
((unsigned long)((addr->c<<16)|(addr->e<<8)|(addr->f)))
135+
((unsigned long)((addr->d<<16)|(addr->e<<8)|(addr->f)))
136136

137137
/*
138138
*MAC address reader. Accepts several common notations.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp