From 076f7de55d58e66d21d2e57327ee515d6e7d03a9 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Sat, 6 Apr 2013 10:18:41 +0200 Subject: [PATCH] netsniff-ng: also capture if NIC is currently down There is actually no reason why netsniff-ng should fail if the NIC is down at startup. We still can setup everything and already capture at the time it goes up. This might be useful when replugging cables on servers, for instance. Signed-off-by: Daniel Borkmann --- netsniff-ng.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/netsniff-ng.c b/netsniff-ng.c index ecb9e9a7..eaf2416a 100644 --- a/netsniff-ng.c +++ b/netsniff-ng.c @@ -347,8 +347,6 @@ static void receive_to_xmit(struct ctx *ctx) panic("Ingress/egress devices must be different!\n"); if (!device_up_and_running(ctx->device_out)) panic("Egress device not up and running!\n"); - if (!device_up_and_running(ctx->device_in)) - panic("Ingress device not up and running!\n"); rx_sock = pf_socket(); tx_sock = pf_socket(); @@ -820,9 +818,6 @@ static void recv_only_or_dump(struct ctx *ctx) struct timeval start, end, diff; pcap_pkthdr_t phdr; - if (!device_up_and_running(ctx->device_in) && !ctx->rfraw) - panic("Device not up and running!\n"); - sock = pf_socket(); if (ctx->rfraw) { -- 2.11.4.GIT