Skip to content

Commit 1a21d40

Browse files
committed
Skip IEEE Registration Authority records
Signed-off-by: Claudio Matsuoka <[email protected]>
1 parent 9415eaf commit 1a21d40

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ouitools.go

+5
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ func (m *OuiDB) load(path string) error {
8484
// Split input text into address, short organization name
8585
// and full organization name
8686
fields := fieldsRe.FindAllStringSubmatch(text, -1)
87+
88+
if fields[0][2] == "IeeeRegi" {
89+
continue
90+
}
91+
8792
addr := fields[0][1]
8893
if fields[0][4] != "" {
8994
block.Organization = fields[0][4]

ouitools_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ func TestLookup36(t *testing.T) {
6060
lookup(t, "00:1B:C5:00:E1:55", "Vigor Electric Corp")
6161
}
6262

63-
func TestLookup32(t *testing.T) {
64-
lookup(t, "AA-00-03-01-aa-00", "DEC-PROM-AA")
63+
func TestLookup40(t *testing.T) {
64+
lookup(t, "20-52-45-43-56-aa", "Receive")
6565
}
6666

6767
func TestFormatSingleZero(t *testing.T) {

0 commit comments

Comments
 (0)