Bug #3066
closed
dump: Crash when interface cannot be opened
Added by Alex Afanasyev over 10 years ago.
Updated almost 9 years ago.
Description
I tried to run ndn-dump without sudo and got segfault, instead of graceful error message:
vagrant@vagrant-ubuntu-vivid-64:~/ppa-packaging/ndn-tools/work$ ndndump
terminate called after throwing an instance of 'ndn::dump::Ndndump::Error'
what(): Cannot open interface eth0(eth0: You don't have permission to capture on that device (socket: Operation not permitted))
Aborted (core dumped)
- Priority changed from Normal to Low
Not segfault, it's an uncaught exception. The what() error is quite clear already, so I'd say this is low priority.
Yes, it is not that urgent, but it is still an undesired crash that can be easily avoided by just handling the exceptions. On some systems, it may not show what() clause and just core dump.
- Status changed from New to Closed
- Assignee set to Junxiao Shi
This is already addressed in ndn-tools:commit:c75996344f0918aba6f45652237130313dcc32ed.
vagrant@m0212:~/ndn-tools$ build/bin/ndndump
ERROR: no suitable device found
vagrant@m0212:~/ndn-tools$ build/bin/ndndump -i eth0
ERROR: Cannot open interface eth0 (eth0: You don't have permission to capture on that device (socket: Operation not permitted))
Also available in: Atom
PDF