Skip to content

Commit

Permalink
Fix the broken check on Devices[1] (#86).
Browse files Browse the repository at this point in the history
  • Loading branch information
Tudor Golubenco committed Jan 19, 2015
1 parent b46d7db commit 23edeb7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sniffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package main

import (
"fmt"
"os"
"time"

"github.com/packetbeat/gopacket"
"github.com/packetbeat/gopacket/layers"
"github.com/packetbeat/gopacket/pcap"
"os"
"time"
)

type SnifferSetup struct {
Expand Down Expand Up @@ -79,7 +80,7 @@ func CreateSniffer(config *tomlInterfaces, file *string) (*SnifferSetup, error)
}
}
if sniffer.config.Snaplen == 0 {
if sniffer.config.Devices[0] == "any" || sniffer.config.Devices[1] == "lo" {
if sniffer.config.Devices[0] == "any" || sniffer.config.Devices[0] == "lo" {
sniffer.config.Snaplen = 16436
} else {
sniffer.config.Snaplen = 1514
Expand Down

0 comments on commit 23edeb7

Please sign in to comment.