From e40f1fe9a72fe0419689dad5e82a1fe988255549 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 2 May 2015 17:46:21 +0100 Subject: [PATCH] fix typo and reformat --- router/pcap.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/router/pcap.go b/router/pcap.go index c3cd96d0..b7365f68 100644 --- a/router/pcap.go +++ b/router/pcap.go @@ -45,13 +45,12 @@ func newPcapIO(ifName string, promisc bool, snaplen int, bufSz int) (handle *Pca return } if err = inactive.SetImmediateMode(true); err != nil { - // If gopacket is compiled against an older pcap.h - // that doesn't have pcap_set_immediate_mode, it - // supplies a dummy definition that always returns - // PCAP_ERROR. That becomes "Generic error", which is - // not very helpful. The real pcap_set_set_immediate - // never returns PCAP_ERROR, so this turns it into a - // more informative message. + // If gopacket is compiled against an older pcap.h that + // doesn't have pcap_set_immediate_mode, it supplies a dummy + // definition that always returns PCAP_ERROR. That becomes + // "Generic error", which is not very helpful. The real + // pcap_set_immediate_mode never returns PCAP_ERROR, so this + // turns it into a more informative message. if fmt.Sprint(err) == "Generic error" { err = fmt.Errorf("compiled against an old version of libpcap; please compile against libpcap-1.5.0 or later") }