Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix IPv6 validation when VM gets route advertisements
For unknown reasons right now, on 456.x stemcells, the VM was not
receiving route advertisements, or was not assigning ipv6 addresses
received via the route advertiser. On newer stemcells, this was
happening and led to interfaces like eth1 having multiple IP addresses.
This broke in two places:
* arping: this does not exist for ipv6 and the replacement is ndp
(neighbor discovery protocol). For this commit, just ignore ipv6
addresses
* ip addr validation: bosh-agent validates that the IP assigned by the
bosh-director is actually configured on an interface. The previous logic
used the first address configured on the interface instead of
enumerating through all addresses. An example error message from
`/var/vcap/bosh/log/current`:
```
Validating network interface 'eth1' IP addresses, expected: '2601:0646:0100:69f5:0000:0000:0000:0001', actual: '2601:0646:0100:69f5:0102:03ff:fe04:0506'
```
While `ip a` would show something like:
```
1: eth1: ...
link/ether ...
inet6 2601:0646:0100:69f5:0102:03ff:fe04:0506/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 2591996sec preferred_lft 604796sec
inet6 2601:0646:0100:69f5:0000:0000:0000:0001/64 scope global temporary dynamic
valid_lft 588658sec preferred_lft 70072sec
```
Here, the bosh-agent only used the first entry as the "actual assigned
IP", which is incorrect.
[#169694744](https://www.pivotaltracker.com/story/show/169694744)
Co-authored-by: Brian Cunnie <bcunnie@pivotal.io>- Loading branch information
Showing
4 changed files
with
55 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters