Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > e62f51b3c9c4797a380d8e815dd2df0a > files > 25

dhcpv6-0.10-33.el5.src.rpm

--- /dev/null	2004-02-23 16:02:56.000000000 -0500
+++ dhcp-0.10/htonl.h	2005-01-13 17:23:10.863003000 -0500
@@ -0,0 +1,46 @@
+#ifndef _HTONL_H
+#define HTONL_H
+
+/* Get machine dependent optimized versions of byte swapping functions.  */
+#include <features.h>
+#include <stdint.h>
+#include <bits/types.h>
+#include <endian.h>
+#include <bits/byteswap.h>
+/* Functions to convert between host and network byte order.
+
+   Please note that these functions normally take `unsigned long int' or
+   `unsigned short int' values as arguments and also return them.  But
+   this was a short-sighted decision since on different systems the types
+   may have different representations but the values are always the same.  */
+
+extern uint32_t ntohl (uint32_t __netlong) __THROW __attribute__ ((__const__));
+extern uint16_t ntohs (uint16_t __netshort)
+     __THROW __attribute__ ((__const__));
+extern uint32_t htonl (uint32_t __hostlong)
+     __THROW __attribute__ ((__const__));
+extern uint16_t htons (uint16_t __hostshort)
+     __THROW __attribute__ ((__const__));
+
+#ifdef __OPTIMIZE__
+/* We can optimize calls to the conversion functions.  Either nothing has
+   to be done or we are using directly the byte-swapping functions which
+   often can be inlined.  */
+# if __BYTE_ORDER == __BIG_ENDIAN
+/* The host byte order is the same as network byte order,
+   so these functions are all just identity.  */
+# define ntohl(x)	(x)
+# define ntohs(x)	(x)
+# define htonl(x)	(x)
+# define htons(x)	(x)
+# else
+#  if __BYTE_ORDER == __LITTLE_ENDIAN
+#   define ntohl(x)	__bswap_32 (x)
+#   define ntohs(x)	__bswap_16 (x)
+#   define htonl(x)	__bswap_32 (x)
+#   define htons(x)	__bswap_16 (x)
+#  endif
+# endif
+#endif
+
+#endif
--- dhcp-0.10/ifaddrs.c.warnings	2003-04-22 14:05:33.000000000 -0400
+++ dhcp-0.10/ifaddrs.c	2005-01-13 17:23:10.880984000 -0500
@@ -45,6 +45,8 @@
 #include "libc-compat.h"
 #endif
 
+extern int __close( int );
+
 /* ====================================================================== */
 struct nlmsg_list
 {
--- dhcp-0.10/ra_token.l.warnings	2005-01-13 17:23:09.993872000 -0500
+++ dhcp-0.10/ra_token.l	2005-01-13 17:23:10.901964000 -0500
@@ -119,7 +119,7 @@
 			strcat(buff, ":0");
 			len += 2;
 		} 
-		strcat(buff, "\0");
+		buff[len]='\0';
 		if (inet_pton(AF_INET6, buff, &addr) < 1) 
 			ABORT;
 		memcpy(&rainfo->prefix, &addr, sizeof(rainfo->prefix));
--- dhcp-0.10/resolv_token.l.warnings	2005-01-13 17:23:10.052813000 -0500
+++ dhcp-0.10/resolv_token.l	2005-01-13 17:23:10.918946000 -0500
@@ -240,7 +240,7 @@
 			" failed to fdopen resolv.conf.dhcpv6 file", FNAME);
 		return (-1);
 	}
-	yylex();
+	return yylex();
 }
 
 static int
--- dhcp-0.10/server6_addr.c.warnings	2005-01-13 17:23:10.412453000 -0500
+++ dhcp-0.10/server6_addr.c	2005-01-13 17:23:10.937927000 -0500
@@ -40,7 +40,6 @@
 #include <sys/time.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
-
 #include <net/if.h>
 #include <linux/ipv6.h>
 
@@ -57,6 +56,7 @@
 #include "lease.h"
 #include "timer.h"
 #include "hash.h"
+#include "htonl.h"
 
 extern FILE *server6_lease_file;
 
--- dhcp-0.10/server6_parse.y.warnings	2005-01-13 17:23:10.429436000 -0500
+++ dhcp-0.10/server6_parse.y	2005-01-13 17:23:10.956908000 -0500
@@ -49,6 +49,7 @@
 #include "server6_conf.h"
 #include "hash.h"
 #include "lease.h"
+#include "htonl.h"
 
 extern int num_lines;
 extern char *sfyytext;
--- dhcp-0.10/dhcp6s.c.warnings	2005-01-13 17:23:10.379487000 -0500
+++ dhcp-0.10/dhcp6s.c	2005-01-13 17:24:45.923847000 -0500
@@ -1207,7 +1207,7 @@
 				}
 				else {
 					dprintf(LOG_INFO, "%s" "Multiple interface identifier "
-					                       "options in RELAY-FORW Message "
+						               "options in RELAY-FORW Message ",
 					        FNAME);
 					relayfree(&optinfo->relay_list);
 					return NULL;
@@ -1253,6 +1253,7 @@
 			return NULL;
 		}
 	}
+	return NULL;
 }
 
 /*