diff options
author | Codey Oxley <coxley@users.noreply.github.com> | 2016-11-07 16:17:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-07 16:17:09 -0800 |
commit | 92013810c01cc0ed60dec8e25bf4501ada743b1d (patch) | |
tree | a4bb84ad7785e18804ce8b9fbc57b46908a0e099 /main.go | |
parent | cf3e14313ccd3660eb9ac886e5acd50ac68a62fc (diff) | |
parent | 95c5378c6970596a2d50a846646c4d5002943346 (diff) | |
download | fbtracert-92013810c01cc0ed60dec8e25bf4501ada743b1d.zip fbtracert-92013810c01cc0ed60dec8e25bf4501ada743b1d.tar.gz fbtracert-92013810c01cc0ed60dec8e25bf4501ada743b1d.tar.bz2 |
Merge pull request #11 from vcabbage/linklocal
Prevent attempting to use a link local address
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -59,7 +59,7 @@ func getSourceAddr(af string, srcAddr string) (*net.IP, error) { return nil, err } for _, a := range addrs { - if ipnet, ok := a.(*net.IPNet); ok && !ipnet.IP.IsLoopback() { + if ipnet, ok := a.(*net.IPNet); ok && !ipnet.IP.IsLoopback() && !ipnet.IP.IsLinkLocalUnicast() { if (ipnet.IP.To4() != nil && af == "ip4") || (ipnet.IP.To4() == nil && af == "ip6") { return &ipnet.IP, nil } |