From: Felix Fietkau Date: Sun, 4 Jan 2009 00:21:24 +0000 (+0000) Subject: ead: fix bridge handling mistakes X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=6bb52080b451a44a71353bbb068226e3da3a6f97;p=openwrt%2Fstaging%2Fjow.git ead: fix bridge handling mistakes SVN-Revision: 13846 --- diff --git a/package/ead/src/ead.c b/package/ead/src/ead.c index c4d3dd9f41..b6a9310f0f 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);