[Glibc-bsd-commits] r3083 - in trunk/freebsd-utils/debian: . patches

Aurelien Jarno aurel32 at alioth.debian.org
Mon Jul 26 22:42:19 UTC 2010


Author: aurel32
Date: 2010-07-26 22:42:19 +0000 (Mon, 26 Jul 2010)
New Revision: 3083

Added:
   trunk/freebsd-utils/debian/patches/029_arp.diff
   trunk/freebsd-utils/debian/patches/030_arp_libbsd.diff
Modified:
   trunk/freebsd-utils/debian/changelog
   trunk/freebsd-utils/debian/freebsd-net-tools.install
   trunk/freebsd-utils/debian/freebsd-net-tools.manpages
   trunk/freebsd-utils/debian/patches/series
   trunk/freebsd-utils/debian/rules
Log:
  * Add arp to freebsd-net-tools



Modified: trunk/freebsd-utils/debian/changelog
===================================================================
--- trunk/freebsd-utils/debian/changelog	2010-07-26 21:57:48 UTC (rev 3082)
+++ trunk/freebsd-utils/debian/changelog	2010-07-26 22:42:19 UTC (rev 3083)
@@ -5,8 +5,9 @@
 
   [ Aurelien Jarno ]
   * Bumped Standards-Version to 3.9.1 (no changes).
+  * Add arp to freebsd-net-tools
 
- -- Aurelien Jarno <aurel32 at debian.org>  Mon, 26 Jul 2010 23:57:42 +0200
+ -- Aurelien Jarno <aurel32 at debian.org>  Tue, 27 Jul 2010 00:42:09 +0200
 
 freebsd-utils (8.0-12) unstable; urgency=low
 

Modified: trunk/freebsd-utils/debian/freebsd-net-tools.install
===================================================================
--- trunk/freebsd-utils/debian/freebsd-net-tools.install	2010-07-26 21:57:48 UTC (rev 3082)
+++ trunk/freebsd-utils/debian/freebsd-net-tools.install	2010-07-26 22:42:19 UTC (rev 3083)
@@ -6,3 +6,4 @@
 usr.sbin/authpf/authpf		/usr/sbin/
 usr.bin/netstat/netstat		/usr/bin/
 usr.sbin/pppctl/pppctl		/usr/sbin/
+usr.sbin/arp/arp                /usr/sbin/

Modified: trunk/freebsd-utils/debian/freebsd-net-tools.manpages
===================================================================
--- trunk/freebsd-utils/debian/freebsd-net-tools.manpages	2010-07-26 21:57:48 UTC (rev 3082)
+++ trunk/freebsd-utils/debian/freebsd-net-tools.manpages	2010-07-26 22:42:19 UTC (rev 3083)
@@ -5,3 +5,4 @@
 contrib/pf/man/*.5
 usr.bin/netstat/netstat.1
 usr.sbin/pppctl/pppctl.8
+usr.sbin/arp/arp.8

Added: trunk/freebsd-utils/debian/patches/029_arp.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/029_arp.diff	                        (rev 0)
+++ trunk/freebsd-utils/debian/patches/029_arp.diff	2010-07-26 22:42:19 UTC (rev 3083)
@@ -0,0 +1,30 @@
+--- a/usr.sbin/arp/arp.c
++++ b/usr.sbin/arp/arp.c
+@@ -48,7 +48,7 @@
+  * arp - display, set, and delete arp table entries
+  */
+ 
+-
++#define GNU_SOURCE
+ #include <sys/param.h>
+ #include <sys/file.h>
+ #include <sys/socket.h>
+@@ -65,6 +65,7 @@
+ 
+ #include <netinet/in.h>
+ #include <netinet/if_ether.h>
++#include <netinet/ether.h>
+ 
+ #include <arpa/inet.h>
+
+@@ -650,8 +706,8 @@
+  * Nuke an arp entry
+  */
+ static void
+-nuke_entry(struct sockaddr_dl *sdl __unused,
+-	struct sockaddr_inarp *addr, struct rt_msghdr *rtm __unused)
++nuke_entry(struct sockaddr_dl *sdl,
++	struct sockaddr_inarp *addr, struct rt_msghdr *rtm)
+ {
+ 	char ip[20];
+ 

Added: trunk/freebsd-utils/debian/patches/030_arp_libbsd.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/030_arp_libbsd.diff	                        (rev 0)
+++ trunk/freebsd-utils/debian/patches/030_arp_libbsd.diff	2010-07-26 22:42:19 UTC (rev 3083)
@@ -0,0 +1,68 @@
+#
+# To be removed when this functions are available in libbsd
+#
+
+--- a/usr.sbin/arp/arp.c
++++ b/usr.sbin/arp/arp.c
+@@ -113,6 +114,61 @@
+ 
+ #define SETFUNC(f)	{ if (func) usage(); func = (f); }
+ 
++static void *
++reallocf(void *ptr, size_t size)
++{
++	void *nptr;
++
++	nptr = realloc(ptr, size);
++
++	/*
++	 * When the System V compatibility option (malloc "V" flag) is
++	 * in effect, realloc(ptr, 0) frees the memory and returns NULL.
++	 * So, to avoid double free, call free() only when size != 0.
++	 * realloc(ptr, 0) can't fail when ptr != NULL.
++	 */
++	if (!nptr && ptr && size != 0)
++		free(ptr);
++	return (nptr);
++}
++
++static char hexlist[] = "0123456789abcdef";
++
++char *
++link_ntoa(sdl)
++	const struct sockaddr_dl *sdl;
++{
++	static char obuf[64];
++	char *out = obuf;
++	int i;
++	u_char *in = (u_char *)LLADDR(sdl);
++	u_char *inlim = in + sdl->sdl_alen;
++	int firsttime = 1;
++
++	if (sdl->sdl_nlen) {
++		bcopy(sdl->sdl_data, obuf, sdl->sdl_nlen);
++		out += sdl->sdl_nlen;
++		if (sdl->sdl_alen)
++			*out++ = ':';
++	}
++	while (in < inlim) {
++		if (firsttime)
++			firsttime = 0;
++		else
++			*out++ = '.';
++		i = *in++;
++		if (i > 0xf) {
++			out[1] = hexlist[i & 0xf];
++			i >>= 4;
++			out[0] = hexlist[i];
++			out += 2;
++		} else
++			*out++ = hexlist[i];
++	}
++	*out = 0;
++	return (obuf);
++}
++
+ int
+ main(int argc, char *argv[])
+ {

Modified: trunk/freebsd-utils/debian/patches/series
===================================================================
--- trunk/freebsd-utils/debian/patches/series	2010-07-26 21:57:48 UTC (rev 3082)
+++ trunk/freebsd-utils/debian/patches/series	2010-07-26 22:42:19 UTC (rev 3083)
@@ -25,3 +25,5 @@
 026_kdump.diff
 027_pppctl.diff
 028_vidcontrol.diff
+029_arp.diff
+030_arp_libbsd.diff

Modified: trunk/freebsd-utils/debian/rules
===================================================================
--- trunk/freebsd-utils/debian/rules	2010-07-26 21:57:48 UTC (rev 3082)
+++ trunk/freebsd-utils/debian/rules	2010-07-26 22:42:19 UTC (rev 3083)
@@ -34,7 +34,7 @@
 		 sbin/kldconfig sbin/kldload sbin/kldstat sbin/kldunload \
 		 usr.bin/ktrdump usr.bin/vmstat sbin/devfs \
 		 sbin/ifconfig sbin/route usr.bin/netstat usr.sbin/rpc.umntall \
-	         usr.sbin/ppp usr.sbin/pppctl usr.sbin/pppd \
+	         usr.sbin/ppp usr.sbin/pppctl usr.sbin/pppd usr.sbin/arp \
 		 sbin/ipfw contrib/pf sbin/pfctl usr.sbin/authpf \
 		 sbin/mount_std sbin/umount sbin/mount_autofs sbin/mount_cd9660 \
 		 sbin/mount_ext2fs sbin/mount_hpfs sbin/mount_msdosfs sbin/mount_nfs \
@@ -131,6 +131,7 @@
 	$(PMAKE) -C sbin/pfctl
 	$(PMAKE) -C sbin/route
 	$(PMAKE) -C usr.bin/netstat
+	$(PMAKE) -C usr.sbin/arp
 	$(PMAKE) -C usr.sbin/authpf
 	$(PMAKE) -C usr.sbin/pppctl
 	touch $@
@@ -191,6 +192,7 @@
 	$(PMAKE) -C sbin/pfctl clean
 	$(PMAKE) -C sbin/route clean
 	$(PMAKE) -C usr.bin/netstat clean
+	$(PMAKE) -C usr.sbin/arp clean
 	$(PMAKE) -C usr.sbin/authpf clean
 	$(PMAKE) -C usr.sbin/pppctl clean
 




More information about the Glibc-bsd-commits mailing list