summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/ndp.go
diff options
context:
space:
mode:
authorGhanan Gowripalan <ghanan@google.com>2020-02-21 09:53:56 -0800
committerCopybara-Service <copybara-worker@google.com>2020-02-21 09:54:55 -0800
commit97c07242c37e56f6cfdc52036d554052ba95f2ae (patch)
tree0df30adfdba4074591d54b5c075b415721731e53 /pkg/tcpip/stack/ndp.go
parentf1b72752e5de2abc3c409a6b7447224620b7c11b (diff)
Use Route.MaxHeaderLength when constructing NDP RS
Test: stack_test.TestRouterSolicitation PiperOrigin-RevId: 296454766
Diffstat (limited to 'pkg/tcpip/stack/ndp.go')
-rw-r--r--pkg/tcpip/stack/ndp.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/stack/ndp.go b/pkg/tcpip/stack/ndp.go
index 19bd05aa3..f651871ce 100644
--- a/pkg/tcpip/stack/ndp.go
+++ b/pkg/tcpip/stack/ndp.go
@@ -1235,7 +1235,7 @@ func (ndp *ndpState) startSolicitingRouters() {
}
payloadSize := header.ICMPv6HeaderSize + header.NDPRSMinimumSize
- hdr := buffer.NewPrependable(header.IPv6MinimumSize + payloadSize)
+ hdr := buffer.NewPrependable(int(r.MaxHeaderLength()) + payloadSize)
pkt := header.ICMPv6(hdr.Prepend(payloadSize))
pkt.SetType(header.ICMPv6RouterSolicit)
pkt.SetChecksum(header.ICMPv6Checksum(pkt, r.LocalAddress, r.RemoteAddress, buffer.VectorisedView{}))