[TR064] Fix pattern excluding some valid ip-addresses (#13894)
* Improve logging and adjusted timeout * Fix wanBlockIPs regex Signed-off-by: Leo Siepel <leosiepel@gmail.com>
This commit is contained in:
parent
61b5c26b58
commit
b9f092fdb2
@ -226,13 +226,15 @@ public class SOAPValueConverter {
|
||||
@SuppressWarnings("unused")
|
||||
private State processTamListURL(State state, Tr064ChannelConfig channelConfig) throws PostProcessingException {
|
||||
try {
|
||||
ContentResponse response = httpClient.newRequest(state.toString()).timeout(1000, TimeUnit.MILLISECONDS)
|
||||
ContentResponse response = httpClient.newRequest(state.toString()).timeout(1500, TimeUnit.MILLISECONDS)
|
||||
.send();
|
||||
String responseContent = response.getContentAsString();
|
||||
int messageCount = responseContent.split("<New>1</New>").length - 1;
|
||||
|
||||
return new DecimalType(messageCount);
|
||||
} catch (InterruptedException | TimeoutException | ExecutionException e) {
|
||||
} catch (TimeoutException e) {
|
||||
throw new PostProcessingException("Failed to get TAM list due to time out from URL " + state.toString(), e);
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
throw new PostProcessingException("Failed to get TAM list from URL " + state.toString(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
serviceId="urn:X_AVM-DE_HostFilter-com:serviceId:X_AVM-DE_HostFilter1"/>
|
||||
<getAction name="GetWANAccessByIP" argument="NewDisallow">
|
||||
<parameter name="NewIPv4Address" thingParameter="wanBlockIPs"
|
||||
pattern="([1-9]\d{0,2}\.){3}[1-9]\d{0,2}(\s*#.*)*"/>
|
||||
pattern="^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}$"/>
|
||||
</getAction>
|
||||
<setAction name="DisallowWANAccessByIP" argument="NewDisallow">
|
||||
<parameter name="NewIPv4Address" thingParameter="wanBlockIPs"/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user