[openib-general] Port of ISC DHCP-3.0.2 to OpenIB IPoIB

Hal Rosenstock halr at voltaire.com
Wed Mar 30 05:45:01 PST 2005


I just spent a little time porting ISC DHCP-3.0.2 to support DHCP over
Infiniband per IETF Internet Draft
draft-ietf-ipoib-dhcp-over-infiniband-09.txt. There are a couple of
minor things to verify before making this available to
dhcp-hackers at isc.org. I wanted to make this available to this community
first. Any feedback is welcome.

-- Hal

diff -urN dhcp-3.0.2.orig/common/bpf.c dhcp-3.0.2/common/bpf.c
--- dhcp-3.0.2.orig/common/bpf.c	2004-11-24 12:39:15.000000000 -0500
+++ dhcp-3.0.2/common/bpf.c	2005-03-25 15:38:57.000000000 -0500
@@ -194,6 +194,41 @@
 	BPF_STMT(BPF_RET+BPF_K, 0),
 };
 
+#if defined (HAVE_IPOIB_SUPPORT)
+/* Packet filter program...
+   XXX Changes to the filter program may require changes to the constant
+   offsets used in if_register_send to patch the BPF program! XXX */
+
+struct bpf_insn dhcp_bpf_ipoib_filter [] = {
+	/* Make sure this is an IP packet... */
+	BPF_STMT (BPF_LD + BPF_H + BPF_ABS, 0),
+	BPF_JUMP (BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 0, 8),
+
+	/* Make sure it's a UDP packet... */
+	BPF_STMT (BPF_LD + BPF_B + BPF_ABS, 13),
+	BPF_JUMP (BPF_JMP + BPF_JEQ + BPF_K, IPPROTO_UDP, 0, 6),
+
+	/* Make sure this isn't a fragment... */
+	BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 10),
+	BPF_JUMP(BPF_JMP + BPF_JSET + BPF_K, 0x1fff, 4, 0),
+
+	/* Get the IP header length... */
+	BPF_STMT (BPF_LDX + BPF_B + BPF_MSH, 4),
+
+	/* Make sure it's to the right port... */
+	BPF_STMT (BPF_LD + BPF_H + BPF_IND, 6),
+	BPF_JUMP (BPF_JMP + BPF_JEQ + BPF_K, 67, 0, 1),             /* patch */
+
+	/* If we passed all the tests, ask for the whole packet. */
+	BPF_STMT(BPF_RET+BPF_K, (u_int)-1),
+	/* Otherwise, drop it. */
+	BPF_STMT(BPF_RET+BPF_K, 0),
+};
+
+int dhcp_bpf_ipoib_filter_len = (sizeof dhcp_bpf_ipoib_filter /
+				 sizeof (struct bpf_insn));
+#endif
+
 #if defined (DEC_FDDI)
 struct bpf_insn *bpf_fddi_filter;
 #endif
diff -urN dhcp-3.0.2.orig/common/conflex.c dhcp-3.0.2/common/conflex.c
--- dhcp-3.0.2.orig/common/conflex.c	2004-11-24 12:39:15.000000000 -0500
+++ dhcp-3.0.2/common/conflex.c	2005-03-26 07:49:40.000000000 -0500
@@ -740,6 +740,8 @@
 			return IS;
 		if (!strcasecmp (atom + 1, "gnore"))
 			return IGNORE;
+		if (!strcasecmp (atom + 1, "poib"))
+			return IPOIB;
 		break;
 	      case 'k':
 		if (!strncasecmp (atom + 1, "nown", 4)) {
diff -urN dhcp-3.0.2.orig/common/discover.c dhcp-3.0.2/common/discover.c
--- dhcp-3.0.2.orig/common/discover.c	2004-06-10 13:59:16.000000000 -0400
+++ dhcp-3.0.2/common/discover.c	2005-03-25 16:04:41.000000000 -0500
@@ -484,6 +484,14 @@
 			memcpy (&tmp -> hw_address.hbuf [1], sa.sa_data, 16);
 			break;
 
+#ifndef HAVE_ARPHRD_IPOIB
+# define ARPHRD_IPOIB HTYPE_IPOIB
+#endif
+		      case ARPHRD_IPOIB:
+			tmp -> hw_address.hlen = 1;
+			tmp -> hw_address.hbuf [0] = HTYPE_IPOIB;
+			break;
+
 #ifdef HAVE_ARPHRD_METRICOM
 		      case ARPHRD_METRICOM:
 			tmp -> hw_address.hlen = 7;
diff -urN dhcp-3.0.2.orig/common/ipoib.c dhcp-3.0.2/common/ipoib.c
--- dhcp-3.0.2.orig/common/ipoib.c	1969-12-31 19:00:00.000000000 -0500
+++ dhcp-3.0.2/common/ipoib.c	2005-03-29 23:45:52.000000000 -0500
@@ -0,0 +1,110 @@
+/* ipoib.c
+
+   Packet assembly code, originally contributed by Archie Cobbs. */
+
+/*
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1996-2003 by Internet Software Consortium
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ *   Internet Systems Consortium, Inc.
+ *   950 Charter Street
+ *   Redwood City, CA 94063
+ *   <info at isc.org>
+ *   http://www.isc.org/
+ *
+ * This software has been written for Internet Systems Consortium
+ * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
+ * To learn more about Internet Systems Consortium, see
+ * ``http://www.isc.org/''.  To learn more about Vixie Enterprises,
+ * see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
+ * ``http://www.nominum.com''.
+ */
+
+#ifndef lint
+static char copyright[] =
+"$Id: ipoib.c,v 1.3.2.2 2004/06/10 17:59:18 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium.  All rights reserved.\n";
+#endif /* not lint */
+
+#include "dhcpd.h"
+
+#if defined (HAVE_IPOIB_SUPPORT)
+
+#define INFINIBAND_ALEN 20
+
+struct ipoib_header {
+	u16 proto;
+	u16 reserved;
+};
+
+struct ipoib_pseudoheader {
+	u8  hwaddr[INFINIBAND_ALEN];
+};
+
+static const u8 ipv4_bcast_addr[] = {
+	0x00, 0xff, 0xff, 0xff,
+	0xff, 0x12, 0x40, 0x1b, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff
+};
+
+#if defined (PACKET_ASSEMBLY) || defined (PACKET_DECODING)
+#include "includes/netinet/if_ether.h"
+#endif /* PACKET_ASSEMBLY || PACKET_DECODING */
+
+#if defined (PACKET_ASSEMBLY)
+/* Assemble an hardware header... */
+
+void assemble_ipoib_header (interface, buf, bufix, to, toip)
+	struct interface_info *interface;
+	unsigned char *buf;
+	unsigned *bufix;
+	struct hardware *to;
+	u_int32_t toip;
+{
+	struct ipoib_header hdr;
+
+	/* Need pseudoheader if some sort of broadcast */
+	/* Only supports limited broadcast right now */
+	/* Does subnet broadcast also needed to be supported ? */
+	if (toip = 0xffffffff) {
+		/* Fill in IPoIB pseudoheader */
+		/* Currently assumes scope of 2 (link local)  */
+		/* Might need to cycle through all scopes :-( */
+		memcpy (&buf [*bufix], &ipv4_bcast_addr, sizeof(ipv4_bcast_addr));
+		*bufix += sizeof(ipv4_bcast_addr);
+	}
+
+	hdr.proto = htons (ETHERTYPE_IP);
+	hdr.reserved = 0;
+
+	memcpy (&buf [*bufix], &hdr, sizeof(hdr));
+	*bufix += sizeof(hdr);	
+}
+#endif /* PACKET_ASSEMBLY */
+
+#ifdef PACKET_DECODING
+/* Decode a hardware header... */
+
+ssize_t decode_ipoib_header (interface, buf, bufix, from)
+     struct interface_info *interface;
+     unsigned char *buf;
+     unsigned bufix;
+     struct hardware *from;
+{
+	from -> hbuf [0] = HTYPE_IPOIB;
+	memcpy (&from -> hbuf [1], &buf [bufix], sizeof(struct ipoib_header));
+	return sizeof(struct ipoib_header);
+}
+#endif /* PACKET_DECODING */
+#endif /* HAVE_IPOIB_SUPPORT */
diff -urN dhcp-3.0.2.orig/common/lpf.c dhcp-3.0.2/common/lpf.c
--- dhcp-3.0.2.orig/common/lpf.c	2004-11-24 12:39:15.000000000 -0500
+++ dhcp-3.0.2/common/lpf.c	2005-03-29 18:45:09.000000000 -0500
@@ -168,6 +168,12 @@
 static void lpf_tr_filter_setup (struct interface_info *);
 #endif
 
+#if defined (HAVE_IPOIB_SUPPORT)
+extern struct sock_filter dhcp_bpf_ipoib_filter [];
+extern int dhcp_bpf_ipoib_filter_len;
+static void lpf_ipoib_filter_setup (struct interface_info *);
+#endif
+
 static void lpf_gen_filter_setup (struct interface_info *);
 
 void if_register_receive (info)
@@ -181,6 +187,13 @@
 		lpf_tr_filter_setup (info);
 	else
 #endif
+
+#if defined (HAVE_IPOIB_SUPPORT)
+	if (info -> hw_address.hbuf [0] == HTYPE_IPOIB)
+		lpf_ipoib_filter_setup (info);
+	else
+#endif
+
 		lpf_gen_filter_setup (info);
 
 	if (!quiet_interface_discovery)
@@ -222,7 +235,7 @@
 	p.len = dhcp_bpf_filter_len;
 	p.filter = dhcp_bpf_filter;
 
-        /* Patch the server port into the LPF  program...
+        /* Patch the server port into the LPF program...
 	   XXX changes to filter program may require changes
 	   to the insn number(s) used below! XXX */
 	dhcp_bpf_filter [8].k = ntohs ((short)local_port);
@@ -254,7 +267,7 @@
 	p.len = dhcp_bpf_tr_filter_len;
 	p.filter = dhcp_bpf_tr_filter;
 
-        /* Patch the server port into the LPF  program...
+        /* Patch the server port into the LPF program...
 	   XXX changes to filter program may require changes
 	   XXX to the insn number(s) used below!
 	   XXX Token ring filter is null - when/if we have a filter 
@@ -277,6 +290,38 @@
 	}
 }
 #endif /* HAVE_TR_SUPPORT */
+
+#ifdef HAVE_IPOIB_SUPPORT
+static void lpf_ipoib_filter_setup (info)
+	struct interface_info *info;
+{
+	struct sock_fprog p;
+
+	/* Set up the bpf filter program structure.    This is defined in
+	   bpf.c */
+	p.len = dhcp_bpf_ipoib_filter_len;
+	p.filter = dhcp_bpf_ipoib_filter;
+
+	/* Patch the server port into the LPF program...
+	   XXX changes to filter program may require changes
+	   to the insn number(s) used below! XXX */
+	dhcp_bpf_ipoib_filter [8].k = ntohs ((short)local_port);
+
+	if (setsockopt (info -> rfdesc, SOL_SOCKET, SO_ATTACH_FILTER, &p,
+			sizeof p) < 0) {
+		if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
+		    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
+		    errno == EAFNOSUPPORT) {
+			log_error ("socket: %m - make sure");
+			log_error ("CONFIG_PACKET (Packet socket) %s",
+				   "and CONFIG_FILTER");
+			log_error ("(Socket Filtering) are enabled %s",
+				   "in your kernel");
+		}
+		log_fatal ("Can't install packet filter program: %m");
+	}
+}
+#endif /* HAVE_IPOIB_SUPPORT */
 #endif /* USE_LPF_RECEIVE */
 
 #ifdef USE_LPF_SEND
@@ -302,7 +347,7 @@
 				      len, from, to, hto);
 
 	/* Assemble the headers... */
-	assemble_hw_header (interface, (unsigned char *)hh, &hbufp, hto);
+	assemble_hw_header (interface, (unsigned char *)hh, &hbufp, hto, to -> sin_addr.s_addr);
 	fudge = hbufp % 4;	/* IP header must be word-aligned. */
 	memcpy (buf + fudge, (unsigned char *)hh, hbufp);
 	ibufp = hbufp + fudge;
@@ -312,7 +357,7 @@
 	memcpy (buf + ibufp, raw, len);
 
 	/* For some reason, SOCK_PACKET sockets can't be connected,
-	   so we have to do a sentdo every time. */
+	   so we have to do a sendto every time. */
 	memset (&sa, 0, sizeof sa);
 	sa.sa_family = AF_PACKET;
 	strncpy (sa.sa_data,
@@ -383,7 +428,14 @@
 int can_receive_unicast_unconfigured (ip)
 	struct interface_info *ip;
 {
+#if defined (HAVE_IPOIB_SUPPORT)
+	if (!strncmp (ip->name, "ib", 2))
+		return 0;
+	else
+		return 1;
+#else
 	return 1;
+#endif
 }
 
 int supports_multiple_interfaces (ip)
diff -urN dhcp-3.0.2.orig/common/Makefile.dist dhcp-3.0.2/common/Makefile.dist
--- dhcp-3.0.2.orig/common/Makefile.dist	2004-09-21 16:33:35.000000000 -0400
+++ dhcp-3.0.2/common/Makefile.dist	2005-03-30 08:00:08.000000000 -0500
@@ -24,11 +24,11 @@
 SEDMANPAGES = dhcp-options.man5 dhcp-eval.man5
 SRC    = raw.c parse.c nit.c icmp.c dispatch.c conflex.c upf.c bpf.c socket.c \
 	 lpf.c dlpi.c packet.c tr.c ethernet.c memory.c print.c options.c \
-	 inet.c tree.c tables.c alloc.c fddi.c ctrace.c dns.c resolv.c \
+	 inet.c tree.c tables.c alloc.c fddi.c ipoib.c ctrace.c dns.c resolv.c \
 	 execute.c discover.c comapi.c
 OBJ    = raw.o parse.o nit.o icmp.o dispatch.o conflex.o upf.o bpf.o socket.o \
 	 lpf.o dlpi.o packet.o tr.o ethernet.o memory.o print.o options.o \
-	 inet.o tree.o tables.o alloc.o fddi.o ctrace.o dns.o resolv.o \
+	 inet.o tree.o tables.o alloc.o fddi.o ipoib.o ctrace.o dns.o resolv.o \
 	 execute.o discover.o comapi.o
 MAN    = dhcp-options.5 dhcp-eval.5
 
diff -urN dhcp-3.0.2.orig/common/packet.c dhcp-3.0.2/common/packet.c
--- dhcp-3.0.2.orig/common/packet.c	2004-11-24 12:39:16.000000000 -0500
+++ dhcp-3.0.2/common/packet.c	2005-03-25 11:01:46.000000000 -0500
@@ -104,11 +104,12 @@
 }
 
 #ifdef PACKET_ASSEMBLY
-void assemble_hw_header (interface, buf, bufix, to)
+void assemble_hw_header (interface, buf, bufix, to, toip)
 	struct interface_info *interface;
 	unsigned char *buf;
 	unsigned *bufix;
 	struct hardware *to;
+	u_int32_t toip;
 {
 #if defined (HAVE_TR_SUPPORT)
 	if (interface -> hw_address.hbuf [0] == HTYPE_IEEE802)
@@ -120,6 +121,11 @@
 		     assemble_fddi_header (interface, buf, bufix, to);
 	else
 #endif
+#if defined (HAVE_IPOIB_SUPPORT)
+	     if (interface -> hw_address.hbuf [0] == HTYPE_IPOIB)
+		     assemble_ipoib_header (interface, buf, bufix, to, toip);
+	else
+#endif
 		assemble_ethernet_header (interface, buf, bufix, to);
 
 }
@@ -205,6 +211,11 @@
 		     return decode_fddi_header (interface, buf, bufix, from);
 	else
 #endif
+#if defined (HAVE_IPOIB_SUPPORT)
+	     if (interface -> hw_address.hbuf [0] == HTYPE_IPOIB)
+		     return decode_ipoib_header (interface, buf, bufix, from);
+	else
+#endif
 		return decode_ethernet_header (interface, buf, bufix, from);
 }
 
diff -urN dhcp-3.0.2.orig/common/parse.c dhcp-3.0.2/common/parse.c
--- dhcp-3.0.2.orig/common/parse.c	2004-09-30 16:38:31.000000000 -0400
+++ dhcp-3.0.2/common/parse.c	2005-03-26 07:46:36.000000000 -0500
@@ -323,7 +323,7 @@
 
 /*
  * hardware-parameter :== HARDWARE hardware-type colon-seperated-hex-list SEMI
- * hardware-type :== ETHERNET | TOKEN_RING | FDDI
+ * hardware-type :== ETHERNET | TOKEN_RING | FDDI | IPOIB
  */
 
 void parse_hardware_param (cfile, hardware)
@@ -346,6 +346,9 @@
 	      case FDDI:
 		hardware -> hbuf [0] = HTYPE_FDDI;
 		break;
+	      case IPOIB:
+		hardware -> hbuf [0] = HTYPE_IPOIB;
+		break;
 	      default:
 		if (!strncmp (val, "unknown-", 8)) {
 			hardware -> hbuf [0] = atoi (&val [8]);
diff -urN dhcp-3.0.2.orig/includes/dhcpd.h dhcp-3.0.2/includes/dhcpd.h
--- dhcp-3.0.2.orig/includes/dhcpd.h	2004-11-24 12:39:16.000000000 -0500
+++ dhcp-3.0.2/includes/dhcpd.h	2005-03-28 08:25:47.000000000 -0500
@@ -306,9 +306,9 @@
 #	define EPHEMERAL_FLAGS		(MS_NULL_TERMINATION | \
 					 UNICAST_BROADCAST_HACK)
 
-	binding_state_t __attribute__ ((mode (__byte__))) binding_state;
-	binding_state_t __attribute__ ((mode (__byte__))) next_binding_state;
-	binding_state_t __attribute__ ((mode (__byte__))) desired_binding_state;
+	binding_state_t binding_state;
+	binding_state_t next_binding_state;
+	binding_state_t desired_binding_state;
 	
 	struct lease_state *state;
 
@@ -1922,7 +1922,7 @@
 u_int32_t checksum PROTO ((unsigned char *, unsigned, u_int32_t));
 u_int32_t wrapsum PROTO ((u_int32_t));
 void assemble_hw_header PROTO ((struct interface_info *, unsigned char *,
-				unsigned *, struct hardware *));
+				unsigned *, struct hardware *, u_int32_t));
 void assemble_udp_ip_header PROTO ((struct interface_info *, unsigned char *,
 				    unsigned *, u_int32_t, u_int32_t,
 				    u_int32_t, unsigned char *, unsigned));
diff -urN dhcp-3.0.2.orig/includes/dhcp.h dhcp-3.0.2/includes/dhcp.h
--- dhcp-3.0.2.orig/includes/dhcp.h	2004-06-10 13:59:29.000000000 -0400
+++ dhcp-3.0.2/includes/dhcp.h	2005-03-24 13:50:14.000000000 -0500
@@ -75,6 +75,7 @@
 #define HTYPE_ETHER	1               /* Ethernet 10Mbps              */
 #define HTYPE_IEEE802	6               /* IEEE 802.2 Token Ring...	*/
 #define HTYPE_FDDI	8		/* FDDI...			*/
+#define HTYPE_IPOIB	32		/* IPoIB			*/
 
 /* Magic cookie validating dhcp options field (and bootp vendor
    extensions field). */
diff -urN dhcp-3.0.2.orig/includes/dhctoken.h dhcp-3.0.2/includes/dhctoken.h
--- dhcp-3.0.2.orig/includes/dhctoken.h	2004-09-21 15:25:38.000000000 -0400
+++ dhcp-3.0.2/includes/dhctoken.h	2005-03-26 07:51:29.000000000 -0500
@@ -308,7 +308,8 @@
 	REFRESH = 612,
 	DOMAIN_NAME = 613,
 	DO_FORWARD_UPDATE = 614,
-	KNOWN_CLIENTS = 615
+	KNOWN_CLIENTS = 615,
+	IPOIB = 616
 };
 
 #define is_identifier(x)	((x) >= FIRST_TOKEN &&	\
diff -urN dhcp-3.0.2.orig/Makefile.conf dhcp-3.0.2/Makefile.conf
--- dhcp-3.0.2.orig/Makefile.conf	2004-11-24 12:39:13.000000000 -0500
+++ dhcp-3.0.2/Makefile.conf	2005-03-30 08:05:28.000000000 -0500
@@ -312,7 +312,7 @@
 ## Linux 2.2
 ##--linux-2.2--
 #COPTS = -DLINUX_MAJOR=$(MAJORVERSION) -DLINUX_MINOR=$(MINORVERSION) \
-#        $(BINDDEF) $(CC_OPTIONS)
+#        $(BINDDEF) $(CC_OPTIONS) -DHAVE_IPOIB_SUPPORT -DUSERLAND_FILTER
 #CF = cf/linux.h
 #ADMMANDIR = /usr/man/man8
 #ADMMANEXT = .8
diff -urN dhcp-3.0.2.orig/readme-ipoib.txt dhcp-3.0.2/readme-ipoib.txt
--- dhcp-3.0.2.orig/readme-ipoib.txt	1969-12-31 19:00:00.000000000 -0500
+++ dhcp-3.0.2/readme-ipoib.txt	2005-03-30 08:22:37.000000000 -0500
@@ -0,0 +1,53 @@
+3/30/05
+ISC DHCP 3.0.2
+Internet Systems Consortium DHCP Client V3.0.2
+Internet Systems Consortium DHCP Server V3.0.2
+
+Makefile.conf
+	-DHAVE_IPOIB_SUPPORT -DUSERLAND_FILTER
+	To build on Opteron, also add -DPTRSIZE_64BIT
+
+
+Notes about running
+
+Need to configure the Linux kernel to support
+Socket Filtering and the Packet socket.  
+	CONFIG_FILTER=y
+	CONFIG_PACKET=y
+
+
+DHCP client
+
+/sbin/modprobe ib_ipoib
+/sbin/ifconfig ib0 up
+	without IPv4 address
+
+dhclient ib0
+
+need to mkdir /var/state/dhcp so dhclient.leases can be saved
+
+setup /etc/dhclient.conf with client identifier (port GUID)
+interface "ib0" {
+	send dhcp-client-identifier 00:08:f1:04:03:96:05:59;
+}
+
+
+DHCP server
+
+Load IPoIB and configure ib0 with IPv4 address
+IP address configured on ib0
+/sbin/ifconfig ib0 <IPv4 address>
+
+
+dhcpd ib0
+
+setup /etc/dhcpd.conf
+with at least IP address range
+maybe also client identifier if want fixed IP address per client
+ddns-update-style none;
+subnet 192.168.0.0 netmask 255.255.255.0 {
+	range 192.168.0.10 192.168.0.20;
+}
+
+touch /var/state/dhcp/dhcpd.leases
+
diff -urN dhcp-3.0.2.orig/server/dhcp.c dhcp-3.0.2/server/dhcp.c
--- dhcp-3.0.2.orig/server/dhcp.c	2004-11-24 12:39:19.000000000 -0500
+++ dhcp-3.0.2/server/dhcp.c	2005-03-28 08:52:46.000000000 -0500
@@ -267,7 +267,7 @@
 	/* %Audit% This is log output. %2004.06.17,Safe%
 	 * If we truncate we hope the user can get a hint from the log.
 	 */
-	snprintf (msgbuf, sizeof msgbuf, "DHCPDISCOVER from %s %s%s%svia %s",
+	snprintf (msgbuf, sizeof msgbuf, "DHCPDISCOVER from %s %s%s%s via %s",
 		 (packet -> raw -> htype
 		  ? print_hw_addr (packet -> raw -> htype,
 				   packet -> raw -> hlen,
@@ -476,7 +476,7 @@
 	 * If we truncate we hope the user can get a hint from the log.
 	 */
 	snprintf (msgbuf, sizeof msgbuf,
-		 "DHCPREQUEST for %s%s from %s %s%s%svia %s",
+		 "DHCPREQUEST for %s%s from %s %s%s%s via %s",
 		 piaddr (cip), smbuf,
 		 (packet -> raw -> htype
 		  ? print_hw_addr (packet -> raw -> htype,
@@ -769,7 +769,7 @@
 	 * If we truncate we hope the user can get a hint from the log.
 	 */
 	snprintf (msgbuf, sizeof msgbuf,
-		 "DHCPRELEASE of %s from %s %s%s%svia %s (%sfound)",
+		 "DHCPRELEASE of %s from %s %s%s%s via %s (%sfound)",
 		 cstr,
 		 (packet -> raw -> htype
 		  ? print_hw_addr (packet -> raw -> htype,
@@ -859,7 +859,7 @@
 	 * If we truncate we hope the user can get a hint from the log.
 	 */
 	snprintf (msgbuf, sizeof msgbuf,
-		 "DHCPDECLINE of %s from %s %s%s%svia %s",
+		 "DHCPDECLINE of %s from %s %s%s%s via %s",
 		 piaddr (cip),
 		 (packet -> raw -> htype
 		  ? print_hw_addr (packet -> raw -> htype,
@@ -2807,7 +2807,7 @@
 		s = (char *)0;
 
 	/* Say what we're doing... */
-	log_info ("%s on %s to %s %s%s%svia %s",
+	log_info ("%s on %s to %s %s%s%s via %s",
 		  (state -> offer
 		   ? (state -> offer == DHCPACK ? "DHCPACK" : "DHCPOFFER")
 		   : "BOOTREPLY"),






More information about the general mailing list