diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-03-20 13:57:26 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-04-03 08:32:46 +0900 |
commit | 3645e7dee68faff9bd4fbadbb47dc89ecd06058a (patch) | |
tree | ef5414421a1aaf4b20d773707e69e1d3bfd36856 /.goreleaser.yml | |
parent | b41d6b810b7658e503fa7f6fd0bf8571d0c83957 (diff) |
packet/bgp: Avoid data races when serializing
Because "Serialize()" functions of NLRIs or PathAttributes can be called
from some different goroutines, updating fields of a structure can cause
data races.
This patch moves the normalization for each field (mostly length and
flags calculation) into "NewXxx()" or "DecodeFromBytes()" and avoids the
data races.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to '.goreleaser.yml')
0 files changed, 0 insertions, 0 deletions