summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/server.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go
index c8267a44..42ab5c08 100644
--- a/server/server.go
+++ b/server/server.go
@@ -1327,6 +1327,10 @@ func (server *BgpServer) handleModGlobalConfig(grpcReq *GrpcRequest) error {
return fmt.Errorf("gobgp is already started")
}
g := arg.Global
+ id := net.ParseIP(g.RouterId)
+ if id == nil {
+ return fmt.Errorf("invalid router-id format: %s", g.RouterId)
+ }
c := config.Bgp{
Global: config.Global{
GlobalConfig: config.GlobalConfig{