Skip to content

utils: ipset issues #176

@bzub

Description

@bzub

@ryarnyah Could you take a look at these items and tell me if there's a bug or if I'm doing something wrong:

func (ipSet *IPSet) Create(setName string, createOptions ...string) (*Set, error) {

IPSet.Create() adds a Set with a nil pointer, should point to the IPSet object.

_, err := set.runWithStdin(stdin, "restore", "-exist")

The other issue I saw was trying to use Set.Refresh(), the command line would usually be malformed under the call to Restore() linked above. It would end up with Go symbols in the command line like '[hash:net as the type argument. I believe the issue is with the %v printing Go representations of slices in this function:
ipSetRestore += fmt.Sprintf("create %s %v\n", set.Name, set.Options)

Could you also help me understand the workflow for using Save() and Restore() methods? The comments seem more for CLI usage than Go. Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions