summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorinsomniacslk <insomniacslk@users.noreply.github.com>2016-03-23 13:15:40 +0000
committerinsomniacslk <insomniacslk@users.noreply.github.com>2016-03-23 13:15:40 +0000
commit6712c310faaf8e177dbe6897d64138e1499b51ae (patch)
tree05e95c4e8a6f71d9437c7ba2a8eef7dce06dbf14
parent75228635d9b130f6ef991d018b3f249fdc293b24 (diff)
parent4e841d1d5aaa68521bb965a66a57fc0ed095c710 (diff)
downloadfbtracert-6712c310faaf8e177dbe6897d64138e1499b51ae.zip
fbtracert-6712c310faaf8e177dbe6897d64138e1499b51ae.tar.gz
fbtracert-6712c310faaf8e177dbe6897d64138e1499b51ae.tar.bz2
Merge pull request #6 from insomniacslk/master
Printing permissions error conditionally
-rw-r--r--main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.go b/main.go
index 3e2df9d..41d2a31 100644
--- a/main.go
+++ b/main.go
@@ -610,7 +610,10 @@ func main() {
senderDone[ttl-1] = make(chan struct{})
c, err := Sender(senderDone[ttl-1], source, *addrFamily, target, *targetPort, *baseSrcPort, *maxSrcPorts, numIters, ttl, *probeRate, *tosValue)
if err != nil {
- glog.Fatalf("Failed to start sender for ttl %d, %s\n -- are you running with the correct privileges?", ttl, err)
+ glog.Errorf("Failed to start sender for ttl %d, %s", ttl, err);
+ if err.Error() == "operation not permitted" {
+ glog.Error(" -- are you running with the correct privileges?")
+ }
return
}
probes = append(probes, c)