]> Cypherpunks repositories - gostls13.git/commit
syscall: fix alignment check for link-layer information on BSD variants
authorMikio Hara <mikioh.mikioh@gmail.com>
Thu, 24 Sep 2015 06:23:26 +0000 (15:23 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Fri, 25 Sep 2015 22:00:27 +0000 (22:00 +0000)
commit707b619c3a9d94ea61a471aeecfe1c914c3372e1
tree907fb4985af8f14cdd99c154017c64d86c90c2ea
parent81fada52a6abe385c7e996f9908d8733fb5f0f28
syscall: fix alignment check for link-layer information on BSD variants

When link-layer information is wrapped with sockaddr_dl, we need to
follow the len field of sockaddr_dl. When link-layer information is
naked, we need to use the length of whole link-layer information.

Fixes #12641.

Change-Id: I4d377f64cbab1760b993fc55c719288616042bbb
Reviewed-on: https://go-review.googlesource.com/14939
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/syscall/route_bsd.go
src/syscall/route_bsd_test.go