Skip to content

Issue with HashNetNet #20

@PalSubham

Description

@PalSubham
use ipset::{Session, types::*};
use std::net::Ipv4Addr;

fn main() -> Result<(), Error> {
    let mut session = Session::<HashNetNet>::new("test".to_string());
    session.create(|b| b.with_ipv6(false)?.build())?;

    let net1 = NetDataType::new(IpDataType::from("10.0.0.0".parse::<Ipv4Addr>()?), 24);
    let net2 = NetDataType::new(IpDataType::from("20.0.0.0".parse::<Ipv4Addr>()?), 24);


    let ret = session.add((net1, net2), &[])?;
    println!("add {}", ret);

    Ok(())
}

While running this, I get Error: Cmd("Kernel error received: ipset protocol error\n", true)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions