ing
This commit is contained in:
@@ -109,8 +109,8 @@ func (t *DNSMatcher) Match(info matcher.MatchInfo, index int, packet *matcher.Pa
|
||||
return true
|
||||
}
|
||||
|
||||
func (t *DNSMatcher) IsSend(info matcher.MatchInfo) bool {
|
||||
if 53 == info.Port() {
|
||||
func (t *DNSMatcher) IsSend(port int) bool {
|
||||
if 53 == port {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
@@ -14,7 +14,7 @@ type Matcher interface {
|
||||
|
||||
type UDPMatcher interface {
|
||||
Matcher
|
||||
IsSend(info MatchInfo) bool
|
||||
IsSend(port int) bool
|
||||
}
|
||||
|
||||
type Matchers struct {
|
||||
|
||||
@@ -118,8 +118,8 @@ func (t *SNMPMatcher) Match(info matcher.MatchInfo, index int, packet *matcher.P
|
||||
|
||||
}
|
||||
|
||||
func (t *SNMPMatcher) IsSend(info matcher.MatchInfo) bool {
|
||||
if info.Port() == 161 {
|
||||
func (t *SNMPMatcher) IsSend(port int) bool {
|
||||
if 161 == port {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
@@ -130,8 +130,8 @@ func (t *SNMPMatcher) Match(info matcher.MatchInfo, index int, packet *matcher.P
|
||||
|
||||
}
|
||||
|
||||
func (t *SNMPMatcher) IsSend(info matcher.MatchInfo) bool {
|
||||
if info.Port() == 161 {
|
||||
func (t *SNMPMatcher) IsSend(port int) bool {
|
||||
if 161 == port {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user