Skip to content

Commit

Permalink
add iana names, allows lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
lspgn committed Aug 11, 2024
1 parent 9eaf510 commit 6bfc106
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion producer/proto/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package protoproducer

import (
"fmt"
"strings"

"github.com/netsampler/goflow2/v2/decoders/netflow"
)
Expand Down Expand Up @@ -178,7 +179,7 @@ func (m *SFlowMapper) Map(layer string) MapLayerIterator {
if m == nil {
return nil
}
return &sflowMapperIterator{data: m.data[layer], n: 0}
return &sflowMapperIterator{data: m.data[strings.ToLower(layer)], n: 0}
}

type EndianType string
Expand Down
6 changes: 3 additions & 3 deletions producer/proto/producer_packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ var (
}
parserIPv6HeaderRouting = ParserInfo{
nil, //ParseIPv6HeaderRouting2,
[]string{"ipv6eh_routing", "ipv6eh"},
[]string{"ipv6eh_routing", "ipv6-route", "ipv6eh"},
35,
7,
false,
}
parserIPv6HeaderFragment = ParserInfo{
nil, //ParseIPv6HeaderFragment2,
[]string{"ipv6eh_fragment", "ipv6eh"},
[]string{"ipv6eh_fragment", "ipv6-frag", "ipv6eh"},
35,
6,
true,
Expand Down Expand Up @@ -93,7 +93,7 @@ var (
}
parserICMPv6 = ParserInfo{
nil, //ParseICMPv62,
[]string{"icmpv6"},
[]string{"icmpv6", "ipv6-icmp"},
70,
11,
false,
Expand Down

0 comments on commit 6bfc106

Please sign in to comment.