Skip to content

Add Validations #70

@rye

Description

@rye

As part of #26, we should include some kind of implementation for C-VALIDATE in all of the methods that require the NetAddr to be fully masked.

The worst case I can think of is a NetAddr that isn't masked, which doesn't really cause any harm as masking usually happens regardless. But, if somehow memory gets corrupted and a mask changes, the NetAddr's addr might be wrong. (Think: unsafeness through FFI or something ridiculous like that.)

I think it's sufficient to add debug_assert!'s. Could also add a feature for checks which would be on by default.

Worth some thinking.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions