Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: don't trip over empty HardwareAddr when enumerating interfaces #70

Merged
merged 1 commit into from Jul 25, 2019

Conversation

neilalexander
Copy link
Contributor

Some interfaces do not have a HardwareAddr, e.g. L2TP/IPsec miniport interfaces. Currently when Water tries to enumerate through these interfaces, a panic is masked by a recover() when comparing the v.HardwareAddr slices which go out-of-bounds.

This PR fixes that.

…es (this happens sometimes when miniport/VPN adapters are active on the system)
@songgao songgao merged commit fd331bd into songgao:master Jul 25, 2019
@neilalexander neilalexander deleted the emptyhardwareaddr branch July 25, 2019 19:08
wadey added a commit to slackhq/nebula that referenced this pull request Dec 16, 2019
Links to the diffs below, of note is this fix for `water` which might fix some
Windows issues:

- songgao/water#70

*Direct Dependencies*

    github.com/golang/protobuf           golang/protobuf@v1.3.1...v1.3.2
    github.com/imdario/mergo             darccio/mergo@v0.3.7...v0.3.8
    github.com/miekg/dns                 miekg/dns@v1.1.12...v1.1.25
    github.com/prometheus/client_golang  prometheus/client_golang@v0.9.3...v1.2.1
    github.com/rcrowley/go-metrics       rcrowley/go-metrics@3113b84...cac0b30
    github.com/songgao/water             songgao/water@6ad6ede...fd331bd
    github.com/stretchr/testify          stretchr/testify@v1.3.0...v1.4.0
    golang.org/x/crypto                  golang/crypto@22d7a77...e9b2fee
    golang.org/x/net                     golang/net@f3200d1...c0dbc17
    golang.org/x/sys                     golang/sys@dbbf3f1...ac6580d
    gopkg.in/yaml.v2                     v2.2.2...v2.2.7

*Indirect Dependencies*

    github.com/OneOfOne/xxhash           OneOfOne/xxhash@v1.2.2...v1.2.6
    github.com/alecthomas/template       alecthomas/template@a0175ee...fb15b89
    github.com/alecthomas/units          alecthomas/units@2efee85...f65c72e
    github.com/beorn7/perks              beorn7/perks@v1.0.0...v1.0.1
    github.com/dgryski/go-sip13          dgryski/go-sip13@e10d5fe...25c5027
    github.com/go-kit/kit                go-kit/kit@v0.8.0...v0.9.0
    github.com/gogo/protobuf             gogo/protobuf@v1.1.1...v1.3.1
    github.com/julienschmidt/httprouter  julienschmidt/httprouter@v1.2.0...v1.3.0
    github.com/kr/pty                    kr/pty@v1.1.1...v1.1.8
    github.com/mwitkow/go-conntrack      mwitkow/go-conntrack@cc309e4...2f06839
    github.com/pkg/errors                pkg/errors@v0.8.0...v0.8.1
    github.com/prometheus/client_model   prometheus/client_model@fd36f42...d1d2010
    github.com/prometheus/common         prometheus/common@v0.4.1...v0.7.0
    github.com/prometheus/procfs         prometheus/procfs@a7aeb8d...v0.0.8
    github.com/prometheus/tsdb           prometheus-junkyard/tsdb@v0.7.1...v0.10.0
    github.com/spaolacci/murmur3         spaolacci/murmur3@f09979e...v1.1.0
    github.com/stretchr/objx             stretchr/objx@v0.1.1...v0.2.0
    github.com/vishvananda/netns         vishvananda/netns@13995c7...0a2b9b5
    golang.org/x/sync                    golang/sync@1122301...cd5d95a
    golang.org/x/text                    golang/text@v0.3.0...v0.3.2
    gopkg.in/check.v1                    788fd7840127...41f04d3bba15
wadey added a commit to slackhq/nebula that referenced this pull request Dec 16, 2019
Links to the diffs below, of note is this fix for `water` which might fix some
Windows issues:

- songgao/water#70

*Direct Dependencies*

    Updated  github.com/golang/protobuf           golang/protobuf@v1.3.1...v1.3.2
    Updated  github.com/imdario/mergo             darccio/mergo@v0.3.7...v0.3.8
    Updated  github.com/miekg/dns                 miekg/dns@v1.1.12...v1.1.25
    Updated  github.com/prometheus/client_golang  prometheus/client_golang@v0.9.3...v1.2.1
    Updated  github.com/rcrowley/go-metrics       rcrowley/go-metrics@3113b84...cac0b30
    Updated  github.com/songgao/water             songgao/water@6ad6ede...fd331bd
    Updated  github.com/stretchr/testify          stretchr/testify@v1.3.0...v1.4.0
    Updated  golang.org/x/crypto                  golang/crypto@22d7a77...e9b2fee
    Updated  golang.org/x/net                     golang/net@f3200d1...c0dbc17
    Updated  golang.org/x/sys                     golang/sys@dbbf3f1...ac6580d
    Updated  gopkg.in/yaml.v2                     v2.2.2...v2.2.7

*Indirect Dependencies*

    Updated  github.com/alecthomas/template      alecthomas/template@a0175ee...fb15b89
    Updated  github.com/alecthomas/units         alecthomas/units@2efee85...c3de453
    Updated  github.com/beorn7/perks             beorn7/perks@v1.0.0...v1.0.1
    Updated  github.com/go-kit/kit               go-kit/kit@v0.8.0...v0.9.0
    Updated  github.com/pkg/errors               pkg/errors@v0.8.0...v0.8.1
    Updated  github.com/prometheus/client_model  prometheus/client_model@fd36f42...d1d2010
    Updated  github.com/prometheus/common        prometheus/common@v0.4.1...v0.7.0
    Updated  github.com/prometheus/procfs        prometheus/procfs@a7aeb8d...v0.0.8
    Updated  github.com/vishvananda/netns        vishvananda/netns@13995c7...0a2b9b5
    Updated  golang.org/x/sync                   golang/sync@1122301...cd5d95a
    Updated  golang.org/x/text                   golang/text@v0.3.0...v0.3.2
    Added    github.com/cespare/xxhash/v2        https://github.com/cespare/xxhash/v2/tree/v2.1.1
    Added    github.com/google/go-cmp            https://github.com/google/go-cmp/tree/v0.3.1
    Added    github.com/google/gofuzz            https://github.com/google/gofuzz/tree/v1.0.0
    Added    github.com/json-iterator/go         https://github.com/json-iterator/go/tree/v1.1.7
    Added    github.com/modern-go/concurrent     https://github.com/modern-go/concurrent/tree/bacd9c7ef1dd
    Added    github.com/modern-go/reflect2       https://github.com/modern-go/reflect2/tree/v1.0.1
    Added    golang.org/x/tools                  https://github.com/golang/tools/tree/2ca718005c18
    Added    golang.org/x/xerrors                https://github.com/golang/xerrors/tree/a985d3407aa7
    Removed  github.com/OneOfOne/xxhash          https://github.com/OneOfOne/xxhash/tree/v1.2.2
    Removed  github.com/cespare/xxhash           https://github.com/cespare/xxhash/tree/v1.1.0
    Removed  github.com/dgryski/go-sip13         https://github.com/dgryski/go-sip13/tree/e10d5fee7954
    Removed  github.com/oklog/ulid               https://github.com/oklog/ulid/tree/v1.3.1
    Removed  github.com/prometheus/tsdb          https://github.com/prometheus/tsdb/tree/v0.7.1
    Removed  github.com/spaolacci/murmur3        https://github.com/spaolacci/murmur3/tree/f09979ecbc72
wadey added a commit to slackhq/nebula that referenced this pull request Dec 16, 2019
Links to the diffs below, of note is this fix for `water` which might fix some
Windows issues:

- songgao/water#70

*Direct Dependencies*

    Updated  github.com/golang/protobuf           golang/protobuf@v1.3.1...v1.3.2
    Updated  github.com/imdario/mergo             darccio/mergo@v0.3.7...v0.3.8
    Updated  github.com/miekg/dns                 miekg/dns@v1.1.12...v1.1.25
    Updated  github.com/prometheus/client_golang  prometheus/client_golang@v0.9.3...v1.2.1
    Updated  github.com/rcrowley/go-metrics       rcrowley/go-metrics@3113b84...cac0b30
    Updated  github.com/songgao/water             songgao/water@6ad6ede...fd331bd
    Updated  github.com/stretchr/testify          stretchr/testify@v1.3.0...v1.4.0
    Updated  golang.org/x/crypto                  golang/crypto@22d7a77...e9b2fee
    Updated  golang.org/x/net                     golang/net@f3200d1...c0dbc17
    Updated  golang.org/x/sys                     golang/sys@dbbf3f1...ac6580d
    Updated  gopkg.in/yaml.v2                     v2.2.2...v2.2.7

*Indirect Dependencies*

    Updated  github.com/alecthomas/template      alecthomas/template@a0175ee...fb15b89
    Updated  github.com/alecthomas/units         alecthomas/units@2efee85...c3de453
    Updated  github.com/beorn7/perks             beorn7/perks@v1.0.0...v1.0.1
    Updated  github.com/cespare/xxhash           cespare/xxhash@v1.1.0...v2.1.1
    Updated  github.com/go-kit/kit               go-kit/kit@v0.8.0...v0.9.0
    Updated  github.com/pkg/errors               pkg/errors@v0.8.0...v0.8.1
    Updated  github.com/prometheus/client_model  prometheus/client_model@fd36f42...d1d2010
    Updated  github.com/prometheus/common        prometheus/common@v0.4.1...v0.7.0
    Updated  github.com/prometheus/procfs        prometheus/procfs@a7aeb8d...v0.0.8
    Updated  github.com/vishvananda/netns        vishvananda/netns@13995c7...0a2b9b5
    Updated  golang.org/x/sync                   golang/sync@1122301...cd5d95a
    Updated  golang.org/x/text                   golang/text@v0.3.0...v0.3.2
    Added    github.com/cespare/xxhash/v2        https://github.com/cespare/xxhash/v2/tree/v2.1.1
    Added    github.com/google/go-cmp            https://github.com/google/go-cmp/tree/v0.3.1
    Added    github.com/google/gofuzz            https://github.com/google/gofuzz/tree/v1.0.0
    Added    github.com/json-iterator/go         https://github.com/json-iterator/go/tree/v1.1.7
    Added    github.com/modern-go/concurrent     https://github.com/modern-go/concurrent/tree/bacd9c7ef1dd
    Added    github.com/modern-go/reflect2       https://github.com/modern-go/reflect2/tree/v1.0.1
    Added    golang.org/x/tools                  https://github.com/golang/tools/tree/2ca718005c18
    Added    golang.org/x/xerrors                https://github.com/golang/xerrors/tree/a985d3407aa7
    Removed  github.com/OneOfOne/xxhash          https://github.com/OneOfOne/xxhash/tree/v1.2.2
    Removed  github.com/dgryski/go-sip13         https://github.com/dgryski/go-sip13/tree/e10d5fee7954
    Removed  github.com/oklog/ulid               https://github.com/oklog/ulid/tree/v1.3.1
    Removed  github.com/prometheus/tsdb          https://github.com/prometheus/tsdb/tree/v0.7.1
    Removed  github.com/spaolacci/murmur3        https://github.com/spaolacci/murmur3/tree/f09979ecbc72
wadey added a commit to slackhq/nebula that referenced this pull request Dec 16, 2019
Links to the diffs below, of note is this fix for `water` which might fix some
Windows issues:

- songgao/water#70

*Direct Dependencies*

    Updated  github.com/golang/protobuf           golang/protobuf@v1.3.1...v1.3.2
    Updated  github.com/imdario/mergo             darccio/mergo@v0.3.7...v0.3.8
    Updated  github.com/miekg/dns                 miekg/dns@v1.1.12...v1.1.25
    Updated  github.com/prometheus/client_golang  prometheus/client_golang@v0.9.3...v1.2.1
    Updated  github.com/rcrowley/go-metrics       rcrowley/go-metrics@3113b84...cac0b30
    Updated  github.com/songgao/water             songgao/water@6ad6ede...fd331bd
    Updated  github.com/stretchr/testify          stretchr/testify@v1.3.0...v1.4.0
    Updated  golang.org/x/crypto                  golang/crypto@22d7a77...e9b2fee
    Updated  golang.org/x/net                     golang/net@f3200d1...c0dbc17
    Updated  golang.org/x/sys                     golang/sys@dbbf3f1...ac6580d
    Updated  gopkg.in/yaml.v2                     v2.2.2...v2.2.7

*Indirect Dependencies*

    Updated  github.com/alecthomas/template      alecthomas/template@a0175ee...fb15b89
    Updated  github.com/alecthomas/units         alecthomas/units@2efee85...c3de453
    Updated  github.com/beorn7/perks             beorn7/perks@v1.0.0...v1.0.1
    Updated  github.com/cespare/xxhash           cespare/xxhash@v1.1.0...v2.1.1
    Updated  github.com/go-kit/kit               go-kit/kit@v0.8.0...v0.9.0
    Updated  github.com/pkg/errors               pkg/errors@v0.8.0...v0.8.1
    Updated  github.com/prometheus/client_model  prometheus/client_model@fd36f42...d1d2010
    Updated  github.com/prometheus/common        prometheus/common@v0.4.1...v0.7.0
    Updated  github.com/prometheus/procfs        prometheus/procfs@a7aeb8d...v0.0.8
    Updated  github.com/vishvananda/netns        vishvananda/netns@13995c7...0a2b9b5
    Updated  golang.org/x/sync                   golang/sync@1122301...cd5d95a
    Updated  golang.org/x/text                   golang/text@v0.3.0...v0.3.2
    Added    github.com/google/go-cmp            https://github.com/google/go-cmp/tree/v0.3.1
    Added    github.com/google/gofuzz            https://github.com/google/gofuzz/tree/v1.0.0
    Added    github.com/json-iterator/go         https://github.com/json-iterator/go/tree/v1.1.7
    Added    github.com/modern-go/concurrent     https://github.com/modern-go/concurrent/tree/bacd9c7ef1dd
    Added    github.com/modern-go/reflect2       https://github.com/modern-go/reflect2/tree/v1.0.1
    Added    golang.org/x/tools                  https://github.com/golang/tools/tree/2ca718005c18
    Added    golang.org/x/xerrors                https://github.com/golang/xerrors/tree/a985d3407aa7
    Removed  github.com/OneOfOne/xxhash          https://github.com/OneOfOne/xxhash/tree/v1.2.2
    Removed  github.com/dgryski/go-sip13         https://github.com/dgryski/go-sip13/tree/e10d5fee7954
    Removed  github.com/oklog/ulid               https://github.com/oklog/ulid/tree/v1.3.1
    Removed  github.com/prometheus/tsdb          https://github.com/prometheus/tsdb/tree/v0.7.1
    Removed  github.com/spaolacci/murmur3        https://github.com/spaolacci/murmur3/tree/f09979ecbc72
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants