Skip to content

Commit

Permalink
Add neighbor-address format check for kube-ovn-speaker (#2335)
Browse files Browse the repository at this point in the history
Co-authored-by: Edison Meng (孟志慧)-浪潮数据 <mengzhihui01@inspur.com>
  • Loading branch information
KillMaster9 and Edison Meng (孟志慧)-浪潮数据 committed Feb 15, 2023
1 parent b0b4694 commit cdf5499
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/speaker/config.go
Expand Up @@ -102,6 +102,9 @@ func ParseFlags() (*Configuration, error) {
if *argRouterId != "" && net.ParseIP(*argRouterId) == nil {
return nil, fmt.Errorf("invalid router-id format: %s", *argRouterId)
}
if net.ParseIP(*argNeighborAddress) == nil {
return nil, fmt.Errorf("invalid neighbor-address format: %s", *argNeighborAddress)
}

config := &Configuration{
AnnounceClusterIP: *argAnnounceClusterIP,
Expand Down

0 comments on commit cdf5499

Please sign in to comment.