[PATCH] Bring back missing IPv6 pieces that were lost in time.

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

 



strcmp() -> strncmp() for ipv6 'auto' comparison.  Add back missing
gateway6 member in loaderData.  Initialize ipv6 and gateway6 in
loaderData to NULL.
---
 loader/loader.c |    4 ++++
 loader/loader.h |    1 +
 loader/net.c    |    2 +-
 3 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/loader/loader.c b/loader/loader.c
index 4ef03b5..b30cd6b 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -687,6 +687,10 @@ static void readNetInfo(struct loaderData_s ** ld) {
     loaderData->layer2 = NULL;
     loaderData->portno = NULL;
     loaderData->macaddr = NULL;
+#ifdef ENABLE_IPV6
+    loaderData->ipv6 = NULL;
+    loaderData->gateway6 = NULL;
+#endif
 
     /*
      * The /tmp/netinfo file is written out by /sbin/init on s390x (which is
diff --git a/loader/loader.h b/loader/loader.h
index a0d706c..50ddafe 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -133,6 +133,7 @@ struct loaderData_s {
 #ifdef ENABLE_IPV6
     char *ipv6;
     int ipv6info_set;
+    char *gateway6;
 #endif
     int mtu;
     int noDns;
diff --git a/loader/net.c b/loader/net.c
index 3049fbc..cc8b331 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -291,7 +291,7 @@ void setupIfaceStruct(iface_t * iface, struct loaderData_s * loaderData) {
     if (loaderData->ipv6info_set && loaderData->ipv6 != NULL) {
         if (!strncmp(loaderData->ipv6, "dhcp", 4)) {
             iface->ipv6method = IPV6_DHCP_METHOD;
-        } else if (!strcmp(loaderData->ipv6, "auto", 4)) {
+        } else if (!strncmp(loaderData->ipv6, "auto", 4)) {
             iface->ipv6method = IPV6_AUTO_METHOD;
         } else if (inet_pton(AF_INET6, loaderData->ipv6, &addr6) >= 1) {
             memcpy(&iface->ip6addr, &addr6, sizeof(struct in6_addr));
-- 
1.6.6

_______________________________________________
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