Displaying 14 results from an estimated 14 matches for "is_valid_ipv4".
2010 Jan 14
0
[PATCH] Presents duplicate DNS and NTP server entries.
...{DNS}" ]]; then
printf "\nAborted...\n"
return
@@ -366,15 +367,20 @@ function configure_dns
break
fi
fi
- if is_valid_ipv4 $REPLY; then
+ if is_valid_ipv4 $ADDRESS; then
if [[ -z "${DNS}" ]]; then
- DNS="${REPLY}"
- elif [[ -n "${REPLY}" ]]; then
- DN...
2010 Jan 14
1
Ignore that last patch...
The first line of the comment had a typo in it.
2010 Jan 18
1
Refactored patch...
This patch supercedes the previous and includes fixes based on feedback
from apevec. Duplicate checks now check the whole address, so substrings
won't cause false positives.
2010 Jan 18
1
Fixed a karg issue...
I missed one situation in the last patch. It wasn't properly handling
the karg for NTP. This patch fixes that.
2011 Jul 18
0
[PATCH node] fix ipv6 support in dns/ntp callbacks
...ig-setup.py
index d55ea36..753c80d 100755
--- a/scripts/ovirt-config-setup.py
+++ b/scripts/ovirt-config-setup.py
@@ -231,7 +231,8 @@ class NodeConfigScreen():
warn = 0
if not self.dns_host1.value() is None and not self.dns_host1.value() == "":
if not is_valid_ipv4(self.dns_host1.value()):
- warn = 1
+ if not is_valid_ipv6(self.dns_host1.value()):
+ warn = 1
if warn == 1:
self.screen.setColor("BUTTON", "black", "red")
self.screen.se...
2010 Mar 24
1
Resending a refactored patch...
This was an older patch that had to be rebased against the current
tip.
2010 Mar 24
1
Supercedes previous patch...
This includes a missed break and two spots where $ADDRESS was copied
as $address instead.
2010 Feb 11
3
[PATCH node] remove ipv4 validation for ntp and rely on actual ntp verification
...54c2..40a2d2c 100755
--- a/scripts/ovirt-config-networking
+++ b/scripts/ovirt-config-networking
@@ -414,12 +414,7 @@ function configure_ntp
read -ep "Enter an NTP server (hit return when finished): "
if [ -z "$REPLY" ]; then break; fi
-
- if is_valid_ipv4 $REPLY; then
- NTPSERVERS="${NTPSERVERS}:${REPLY}"
- else
- printf "${REPLY} is an invalid address.\n"
- fi
+ NTPSERVERS="${NTPSERVERS}:${REPLY}"
done
fi
fi
@@ -560,5...
2009 Nov 11
1
[PATCH] Static IPv4 addresses entered are validated when they're entered.
...$1 - the variable name to set
+# $2 - the input prompt
+function input_ipv4_address {
+ local varname=$1
+ local prompt=$2
+
+ eval $varname=\"\"
+
+ while true; do
+ read -ep "${prompt}: "
+
+ if [ -z "$REPLY" ]; then return; fi
+
+ if is_valid_ipv4 $REPLY; then
+ eval $varname=\"$REPLY\"
+ return
+ else
+ printf "\nThe address $REPLY is not a valid IPv4 address.\n"
+ fi
+ done
+}
+
# Checks that a network interface was already configured.
function has_configured_interface...
2009 Dec 07
1
Rebased...
This version of the patch was rebased to go on top of recent changes committed
to ovirt-config-networking on next.
2010 Mar 04
1
[PATCH node] fix network_up
...ck reported ok even when DHCP failed
---
scripts/ovirt-functions | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
index 1db89ae..866f963 100644
--- a/scripts/ovirt-functions
+++ b/scripts/ovirt-functions
@@ -734,7 +734,7 @@ is_valid_ipv4 () {
# Check if networking is already up
network_up () {
- test -n "$(/sbin/ip -o link show up | cut -d: -f2 | grep -v 'lo$')"
+ ip addr show | grep -q "inet.*scope global"
}
# execute a function if called as a script, e.g.
--
1.6.0.6
2011 Aug 03
0
[PATCH] update valid_hostname regex checks
...fig-setup.py
index 8c6c8af..a8f85cf 100755
--- a/scripts/ovirt-config-setup.py
+++ b/scripts/ovirt-config-setup.py
@@ -274,8 +274,8 @@ class NodeConfigScreen():
warn = 0
if not self.ntp_host2.value() is None and not self.ntp_host2.value() == "":
if not is_valid_ipv4(self.ntp_host2.value()):
- if not is_valid_ipv6(self.ntp_host1.value()):
- if not is_valid_hostname(self.ntp_host1.value()):
+ if not is_valid_ipv6(self.ntp_host2.value()):
+ if not is_valid_hostname(self.ntp_host2.valu...
2010 Feb 04
3
[PATCH] Make configure_from_network function check if network is up, before touching it
...network-scripts/ifup-post
IPADDR=$(LC_ALL=C ip -o -4 addr ls dev ${DEVICE} | awk '{ print $4 ; exit }')
diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
index fc43343..2801bd8 100644
--- a/scripts/ovirt-functions
+++ b/scripts/ovirt-functions
@@ -709,6 +709,13 @@ is_valid_ipv4 () {
return $result
}
+# Check if networking is already up
+network_up () {
+ UPIFS=$(/sbin/ip -o link show up | awk -F ": " '{ print $2 }' | grep -v lo | wc -l)
+ test -n "${UPIFS}" -a "${UPIFS}" -gt "0"
+ return $?
+}
+
# execute a...
2011 Aug 11
0
[PATCH] map nics-> bridges correctly in network pages, when cancelling nic configuration return to network page
...uot;])
else:
- current_gateway = get_gateway(self.nic_lb.current())
- if current_gateway == "":
- current_gateway = get_gateway("br" + self.nic_lb.current())
+ current_gateway = get_gateway(dev)
if is_valid_ipv4(current_gateway) or is_valid_ipv6(current_gateway):
self.ipv4_netdevgateway.set(current_gateway)
ipv4_grid = Grid (5,3)
@@ -1576,10 +1572,7 @@ class NodeConfigScreen():
elif self.net_apply_config == 1:
self....