Bläddra i källkod

add acl policy type for any traffic

abhishek9686 9 månader sedan
förälder
incheckning
89cee12ee2
2 ändrade filer med 9 tillägg och 0 borttagningar
  1. 8 0
      controllers/acls.go
  2. 1 0
      models/acl.go

+ 8 - 0
controllers/acls.go

@@ -53,6 +53,14 @@ func aclPolicyTypes(w http.ResponseWriter, r *http.Request) {
 			// models.NetmakerSubNetRangeAClID,
 		},
 		ProtocolTypes: []models.ProtocolType{
+			{
+				Name: models.Any,
+				AllowedProtocols: []models.Protocol{
+					models.ALL,
+				},
+				PortRange:        "All ports",
+				AllowPortSetting: false,
+			},
 			{
 				Name: models.Http,
 				AllowedProtocols: []models.Protocol{

+ 1 - 0
models/acl.go

@@ -34,6 +34,7 @@ const (
 	AllUDP      = "All UDP"
 	ICMPService = "ICMP"
 	Custom      = "Custom"
+	Any         = "Any"
 )
 
 func (p Protocol) String() string {