1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-05-04 19:49:08 -04:00

rename IPNet to IPNetTable

This commit is contained in:
Darien Raymond
2017-08-29 13:51:09 +02:00
parent fee3042239
commit 815019f6da
5 changed files with 26 additions and 20 deletions

View File

@@ -180,11 +180,11 @@ func (v *CIDRMatcher) Apply(ctx context.Context) bool {
}
type IPv4Matcher struct {
ipv4net *v2net.IPNet
ipv4net *v2net.IPNetTable
onSource bool
}
func NewIPv4Matcher(ipnet *v2net.IPNet, onSource bool) *IPv4Matcher {
func NewIPv4Matcher(ipnet *v2net.IPNetTable, onSource bool) *IPv4Matcher {
return &IPv4Matcher{
ipv4net: ipnet,
onSource: onSource,

View File

@@ -17,7 +17,7 @@ func (r *Rule) Apply(ctx context.Context) bool {
}
func cidrToCondition(cidr []*CIDR, source bool) (Condition, error) {
ipv4Net := v2net.NewIPNet()
ipv4Net := v2net.NewIPNetTable()
ipv6Cond := NewAnyCondition()
hasIpv6 := false