diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-04-06 10:18:41 +0200 |
---|---|---|
committer | Daniel Borkmann <dborkman@redhat.com> | 2013-04-06 10:18:41 +0200 |
commit | 076f7de55d58e66d21d2e57327ee515d6e7d03a9 (patch) | |
tree | b43df3a7d12e6ec7aeffa589a77ac7b9a52541eb /netsniff-ng.c | |
parent | 478c2acc910a75a212175598972e01b8fba9ce1e (diff) |
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 <dborkman@redhat.com>
Diffstat (limited to 'netsniff-ng.c')
-rw-r--r-- | netsniff-ng.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c index ecb9e9a..eaf2416 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) { |