diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-06-27 19:40:20 +0900 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-07-01 11:06:08 +0900 |
commit | e7cefb51f9cfd0012384239ee736375841af7a76 (patch) | |
tree | 82555f46303195712765f4c0e3c7b978b5ded253 /packet/validate.go | |
parent | 9b35be73826689b15839105ce0f386bbdaf56f06 (diff) |
table: simplify Path.getPathAttr()
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'packet/validate.go')
-rw-r--r-- | packet/validate.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packet/validate.go b/packet/validate.go index 3da96387..2afd53c4 100644 --- a/packet/validate.go +++ b/packet/validate.go @@ -23,10 +23,10 @@ func ValidateUpdateMsg(m *BGPUpdate, rfs map[RouteFamily]bool) (bool, error) { // check path attribute for _, a := range m.PathAttributes { // check duplication - if _, ok := seen[a.getType()]; !ok { - seen[a.getType()] = a + if _, ok := seen[a.GetType()]; !ok { + seen[a.GetType()] = a } else { - eMsg := "the path attribute apears twice. Type : " + strconv.Itoa(int(a.getType())) + eMsg := "the path attribute apears twice. Type : " + strconv.Itoa(int(a.GetType())) return false, NewMessageError(eCode, eSubCodeAttrList, nil, eMsg) } |