We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 024e126 commit c9274acCopy full SHA for c9274ac
capture/capture.go
@@ -571,10 +571,6 @@ func (l *Listener) setInterfaces() (err error) {
571
}
572
573
for _, pi := range pifis {
574
- if len(pi.Addresses) == 0 {
575
- continue
576
- }
577
-
578
var ni net.Interface
579
for _, i := range ifis {
580
addrs, _ := i.Addrs()
@@ -586,14 +582,16 @@ func (l *Listener) setInterfaces() (err error) {
586
582
587
583
588
584
585
+
+ if len(addrs) == 0 && i.Name == pi.Name {
+ ni = i
+ break
589
+ }
590
591
592
if ni.Flags&net.FlagLoopback != 0 {
593
l.loopIndex = ni.Index
594
- if ni.Flags&net.FlagUp == 0 {
595
596
597
598
if isDevice(l.host, pi) {
599
l.Interfaces = []pcap.Interface{pi}
0 commit comments