components/nmap/patches/94.eth-dlpi.c.patch
changeset 605 8dca74ad1a27
parent 604 c25824a87b1f
child 606 c0d139b44cad
equal deleted inserted replaced
604:c25824a87b1f 605:8dca74ad1a27
     1 --- nmap-5.21/libdnet-stripped/src/eth-dlpi.c	2008-09-18 23:12:25.000000000 -0700
       
     2 +++ nmap-5.21/libdnet-stripped/src/eth-dlpi.c	2011-07-08 02:15:01.517564899 -0700
       
     3 @@ -120,7 +120,7 @@
       
     4  {
       
     5  	union DL_primitives *dlp;
       
     6  	uint32_t buf[8192];
       
     7 -	char *p, dev[16];
       
     8 +	char *p, dev[64];
       
     9  	eth_t *e;
       
    10  	int ppa;
       
    11  
       
    12 @@ -145,6 +145,9 @@
       
    13  	ppa = atoi(p);
       
    14  	*p = '\0';
       
    15  
       
    16 +#if defined(sun) || defined(__sun) || defined(__sun)
       
    17 +	snprintf(dev, sizeof(dev), "/dev/net/%s", device);
       
    18 +#endif
       
    19  	if ((e->fd = open(dev, O_RDWR)) < 0) {
       
    20  		snprintf(dev, sizeof(dev), "/dev/%s", device);
       
    21  		if ((e->fd = open(dev, O_RDWR)) < 0)