FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 01-07-2010, 05:24 PM
David Cantrell
 
Default Bring back missing IPv6 pieces that were lost in time.

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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-07-2010, 05:40 PM
Chris Lumens
 
Default Bring back missing IPv6 pieces that were lost in time.

> strcmp() -> strncmp() for ipv6 'auto' comparison. Add back missing
> gateway6 member in loaderData. Initialize ipv6 and gateway6 in
> loaderData to NULL.

These all look fine.

- Chris

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

Thread Tools




All times are GMT. The time now is 09:53 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org