jvinet / knock

A port-knocking daemon
http://www.zeroflux.org/projects/knock
GNU General Public License v2.0
563 stars 115 forks source link

Internet-device interface going down stops knockd #69

Open o-jasper opened 4 years ago

o-jasper commented 4 years ago

pcap_dispatch(cap, -1, sniff, NULL); returns < 0 in that case causing the program to exit.

This would mean that people might not be able to connect anymore without going to the device and re-enabling it. (Note the .service systemd file doesn't infinite loop it either, but that doesn't seem like the place to solve it...)

In knockoff i solved it by running an infinite loop and just echoing any error.(though really the interface going down is not an error by the program..) Looking at the code, i haven't figured out what it is more specifically other than reading pcap_geterr string.. But really regardless of what the error was, the show must go on?