[PATCH rhel5-branch] Accept dotted-quad netmask for IPv4 in loader UI (#719578)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Resolves: rhbz#719578

Port from master.
---
 loader2/net.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/loader2/net.c b/loader2/net.c
index dc84983..7769191 100644
--- a/loader2/net.c
+++ b/loader2/net.c
@@ -91,11 +91,15 @@ char *nfsServerPrompt = \
 static void cidrCallback(newtComponent co, void * dptr) {
     struct intfconfig_s * data = dptr;
     int cidr, upper = 0;
+    struct in_addr addr;
 
     if (co == data->cidr4Entry) {
         if (data->cidr4 == NULL && data->ipv4 == NULL)
             return;
 
+        if (inet_pton(AF_INET, data->cidr4, &addr) >= 1)
+           return;
+
         cidr = atoi(data->cidr4);
         upper = 32;
     } else if (co == data->cidr6Entry) {
-- 
1.7.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux