Skip to content

Commit

Permalink
fix: the regular expression of quagga BGP neighbor state check does n…
Browse files Browse the repository at this point in the history
…ot match year unit
  • Loading branch information
0x67cq committed Jan 5, 2022
1 parent 915f447 commit 5f39f4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quagga/bgp.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func (b *BGP) Withdraw(n *net.IPNet) error {
var (
neighborRE = regexp.MustCompile(`^BGP neighbor is ([a-f0-9.:]+), remote AS (\d+), local AS (\d+),.*$`)
neighborDescRE = regexp.MustCompile(`^ Description: (.*)$`)
neighborStateRE = regexp.MustCompile(`^ BGP state = (\w+)(, up for ([0-9wdhm:]+))?$`)
neighborStateRE = regexp.MustCompile(`^ BGP state = (\w+)(, up for ([0-9ywdhm:]+))?$`)
neighborStatsRE = regexp.MustCompile(`^ (\w+): +(\d+) +(\d+)$`)
neighborVersionRE = regexp.MustCompile(`^ BGP version (\d), remote router ID ([a-f0-9.:]+)`)
)
Expand Down

0 comments on commit 5f39f4c

Please sign in to comment.