From efd08e1faa771f4ba62b2efcfac7fdaf93b98df8 Mon Sep 17 00:00:00 2001 From: wangxin Date: Mon, 17 Dec 2018 23:14:31 +0600 Subject: [PATCH] =?UTF-8?q?ddos=20IP=E5=AF=BC=E5=85=A5protocl=E6=A0=B9?= =?UTF-8?q?=E6=8D=AEDDOS=E5=8D=8F=E8=AE=AE=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp index af45a3927..1b102cf48 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp @@ -14,6 +14,14 @@ $(function(){ $("#bpsThreadshold").attr("disabled","true"); $("#ppsThreadshold").attr("disabled","true"); } + if($("[name='protocol']").val()==0){ + var _ddosProtocol=$("#antiddosProtocol").val(); + if(_ddosProtocol=="TCP_SYN"){ + $("[name='protocol']").val(6); + }else if(_ddosProtocol=="UDP_NTP"||_ddosProtocol=="UDP_DNS"){ + $("[name='protocol']").val(17); + } + } $("#antiddosProtocol").on("change",function(){ var ddosProtocol=$("#antiddosProtocol").val(); if(ddosProtocol==null||ddosProtocol==""){ @@ -27,6 +35,11 @@ $(function(){ $("#bpsThreadshold").removeAttr("disabled"); $("#ppsThreadshold").removeAttr("disabled"); } + if(ddosProtocol=="TCP_SYN"){ + $("[name='protocol']").val(6); + }else if(ddosProtocol=="UDP_NTP"||ddosProtocol=="UDP_DNS"){ + $("[name='protocol']").val(17); + } }) $(".action").on("change", function() {