packetcap / go-pcap

Packet capture library and tools in native go
Apache License 2.0
14 stars 4 forks source link

when checking netmask, use AND and not ADD #51

Closed deitch closed 1 month ago

deitch commented 1 month ago

The original had a typo, using ALUOpAdd for adding the netmask in the BPF operation, when it should have been ALUOpAnd (one letter difference). This made netmasked operations fail. It also therefore carried through to all of the tests.

Fixes #50