summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp.go
diff options
context:
space:
mode:
Diffstat (limited to 'packet/bgp.go')
-rw-r--r--packet/bgp.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/packet/bgp.go b/packet/bgp.go
index c910f310..d1c77303 100644
--- a/packet/bgp.go
+++ b/packet/bgp.go
@@ -2703,6 +2703,9 @@ type PathAttribute struct {
}
func (p *PathAttribute) Len() int {
+ if p.Length == 0 {
+ p.Length = uint16(len(p.Value))
+ }
l := 2 + p.Length
if p.Flags&BGP_ATTR_FLAG_EXTENDED_LENGTH != 0 {
l += 2