diff options
-rw-r--r-- | pingu_burst.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pingu_burst.c b/pingu_burst.c index 60d30e4..2f4a55b 100644 --- a/pingu_burst.c +++ b/pingu_burst.c @@ -19,6 +19,13 @@ void ping_burst_start(struct ev_loop *loop, struct pingu_host *host) int r; char buf[64]; + /* we bind to device every burst in case an iface disappears and + comes back. e.g ppp0 */ + if (pingu_iface_bind_socket(host->iface, host->status) < 0) { + pingu_host_set_status(host, 0); + return; + } + host->burst.active = 1; host->burst.pings_sent = 0; host->burst.pings_replied = 0; |