23595729 - dnet can't send out packet
authorJingning Ji <jingning.ji@oracle.com>
Tue, 27 Sep 2016 10:35:25 -0700
changeset 7047 65ca2ca3ea90
parent 7045 f341fa83572f
child 7048 c1d43e41adeb
23595729 - dnet can't send out packet
components/libdnet/patches/eth-dlpi.c.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libdnet/patches/eth-dlpi.c.patch	Tue Sep 27 10:35:25 2016 -0700
@@ -0,0 +1,23 @@
+Fix Bug 23595729 dnet can't send out packet
+Will not send upstream
+
+--- libdnet-1.12/src/eth-dlpi.c.orig	2016-09-26 15:47:06.875827196 +0000
++++ libdnet-1.12/src/eth-dlpi.c	2016-09-26 17:00:25.875054128 +0000
[email protected]@ -137,7 +137,7 @@
+ 	}
+ #else
+ 	e->fd = -1;
+-	snprintf(dev, sizeof(dev), "/dev/%s", device);
++	snprintf(dev, sizeof(dev), "/dev/net/%s", device);
+ 	if ((p = strpbrk(dev, "0123456789")) == NULL) {
+ 		errno = EINVAL;
+ 		return (eth_close(e));
[email protected]@ -146,7 +146,7 @@
+ 	*p = '\0';
+ 
+ 	if ((e->fd = open(dev, O_RDWR)) < 0) {
+-		snprintf(dev, sizeof(dev), "/dev/%s", device);
++		snprintf(dev, sizeof(dev), "/dev/net/%s", device);
+ 		if ((e->fd = open(dev, O_RDWR)) < 0)
+ 			return (eth_close(e));
+ 	}