This commit is contained in:
Vladimir Avtsenov 2025-02-11 15:36:56 +03:00
parent 5fd28ae005
commit 0f4820f499
2 changed files with 2 additions and 2 deletions

View File

@ -295,7 +295,7 @@ func (a *App) AddGroup(group *models.Group) error {
Group: group, Group: group,
iptables: a.NetfilterHelper4.IPTables, iptables: a.NetfilterHelper4.IPTables,
ipset: ipset, ipset: ipset,
ipsetToLink: a.NetfilterHelper4.IfaceToIPSet(fmt.Sprintf("%sR_%8x", a.Config.ChainPrefix, group.ID.ID()), group.Interface, ipsetName, false), ipsetToLink: a.NetfilterHelper4.IPSetToLink(fmt.Sprintf("%sR_%8x", a.Config.ChainPrefix, group.ID.ID()), group.Interface, ipsetName, false),
} }
a.Groups[grp.ID] = grp a.Groups[grp.ID] = grp
return a.SyncGroup(grp) return a.SyncGroup(grp)

View File

@ -280,7 +280,7 @@ func (r *IPSetToLink) LinkUpdateHook() error {
return r.insertIPRoute() return r.insertIPRoute()
} }
func (nh *NetfilterHelper) IfaceToIPSet(name string, ifaceName, ipsetName string, softwareMode bool) *IPSetToLink { func (nh *NetfilterHelper) IPSetToLink(name string, ifaceName, ipsetName string, softwareMode bool) *IPSetToLink {
return &IPSetToLink{ return &IPSetToLink{
IPTables: nh.IPTables, IPTables: nh.IPTables,
ChainName: name, ChainName: name,