summaryrefslogtreecommitdiffstats
path: root/package/ead
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-01-04 00:21:24 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-01-04 00:21:24 +0000
commita4087cd37afd28c5ecf7583f5908bf2d6d4b9dfa (patch)
treed2cf678cfc963d66d4a39814146e7aa8ff9474c6 /package/ead
parent1b97636c56d1c13467fa4d50a0d551767c6d2f6b (diff)
ead: fix bridge handling mistakes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13846 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/ead')
-rw-r--r--package/ead/src/ead.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/package/ead/src/ead.c b/package/ead/src/ead.c
index c4d3dd9f4..b6a9310f0 100644
--- a/package/ead/src/ead.c
+++ b/package/ead/src/ead.c
@@ -622,22 +622,21 @@ ead_pcap_reopen(bool first)
{
static char errbuf[PCAP_ERRBUF_SIZE] = "";
- if (pcap_fp_rx != pcap_fp)
+ if (pcap_fp_rx && (pcap_fp_rx != pcap_fp))
pcap_close(pcap_fp_rx);
if (pcap_fp)
pcap_close(pcap_fp);
- pcap_fp_rx = pcap_fp;
+ pcap_fp_rx = NULL;
do {
pcap_fp = pcap_open_live(ifname, PCAP_MRU, 1, PCAP_TIMEOUT, errbuf);
#ifdef linux
- if (brname) {
+ if (brname)
pcap_fp_rx = pcap_open_live(brname, PCAP_MRU, 1, PCAP_TIMEOUT, errbuf);
- if (!pcap_fp_rx)
- pcap_fp_rx = pcap_fp;
- }
#endif
+ if (!pcap_fp_rx)
+ pcap_fp_rx = pcap_fp;
pcap_setfilter(pcap_fp_rx, &pktfilter);
if (first && !pcap_fp) {
DEBUG(1, "WARNING: unable to open interface '%s'\n", ifname);