File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -45,5 +45,13 @@ func localASNForPeer(p peer) string {
45
45
return strconv .FormatInt (p .OptionInformation .LocalAs , 10 )
46
46
}
47
47
48
- return strconv .FormatInt (p .OptionInformation .LocalSystemAs , 10 )
48
+ if p .OptionInformation .LocalSystemAs > 0 {
49
+ return strconv .FormatInt (p .OptionInformation .LocalSystemAs , 10 )
50
+ }
51
+
52
+ if p .LocalASN > 0 {
53
+ return strconv .FormatInt (p .LocalASN , 10 )
54
+ }
55
+
56
+ return "unknown"
49
57
}
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ type peer struct {
12
12
CFGRTI string `xml:"peer-cfg-rti"`
13
13
IP string `xml:"peer-address"`
14
14
ASN string `xml:"peer-as"`
15
+ LocalASN int64 `xml:"local-as"`
15
16
State string `xml:"peer-state"`
16
17
Group string `xml:"peer-group"`
17
18
GroupIndex int64 `xml:"peer-group-index"`
You can’t perform that action at this time.
0 commit comments