Merge pull request #4163 from wfleurant/diagnostic-ping

luci-mod-network: diagnostics.js: pass IP version flag to ping/ping6
This commit is contained in:
Jo-Philipp Wich 2020-06-12 08:41:59 +02:00 committed by GitHub
commit ea5e6e17a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,7 +28,7 @@ return view.extend({
handlePing: function(ev, cmd) {
var exec = cmd || 'ping',
addr = ev.currentTarget.parentNode.previousSibling.value,
args = (exec == 'ping') ? [ '-c', '5', '-W', '1', addr ] : [ '-c', '5', addr ];
args = (exec == 'ping') ? [ '-4', '-c', '5', '-W', '1', addr ] : [ '-6', '-c', '5', addr ];
return this.handleCommand(exec, args);
},