Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't throw exception for empty interface #531

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

someburner
Copy link

had an odd issue on my openwrt router. my libtins app would worked fine until installing netem e.g. opkg install kmod-netem which depends on kmod-sched. After installing that, a new empty interface is created (at least on openwrt, not sure about other distros) that has no IP address.

I see no reason to throw an exception here. It is especially problematic because at least in my app, the interfaces are initialized when the program starts, I suppose in a constructor somewhere.

Simply removing this solves the issue. Perhaps a better approach would be to only throw an exception when a given interface is empty and chosen for us with a sniffer. I'm not exactly sure how kmod-sched uses the empty interface, but it may even be desirable to monitor such an interface.

In short.. I believe this check should be deleted or at least turned into something that doesnt abort a program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant