diff options
author | Niels Provos <provos@cvs.openbsd.org> | 1998-12-26 12:35:13 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 1998-12-26 12:35:13 +0000 |
commit | ac04a74e55b78112d96b5d55c5443258b4090f67 (patch) | |
tree | 055cb5c519dedf49b396a67b9557098b5fc94ff5 /sys/netinet/raw_ip.c | |
parent | ab21f45ce2c1facc9666e9ea8eb0772c0e60272c (diff) |
make ip_id random but ensure that ids dont repeat for some period.
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r-- | sys/netinet/raw_ip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index 36a70c186b5..11cf3f5b69e 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip.c,v 1.12 1998/12/15 02:26:35 deraadt Exp $ */ +/* $OpenBSD: raw_ip.c,v 1.13 1998/12/26 12:35:12 provos Exp $ */ /* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */ /* @@ -207,7 +207,7 @@ rip_output(m, va_alist) return (EINVAL); } if (ip->ip_id == 0) - ip->ip_id = htons(ip_id++); + ip->ip_id = htons(ip_randomid()); /* XXX prevent ip_output from overwriting header fields */ flags |= IP_RAWOUTPUT; ipstat.ips_rawout++; |