Re: non-random IP IDs
From: Kris Kennaway (kris@obsecurity.org)
Date: 04/16/01
- Next message: Cy Schubert - ITSD Open Systems Group: "Re: Interaction between ipfw, IPSEC and natd"
- Previous message: Kris Kennaway: "Re: non-random IP IDs"
- In reply to: Wes Peters: "Re: non-random IP IDs"
- Next in thread: E.B. Dreger: "Re: non-random IP IDs"
- Reply: E.B. Dreger: "Re: non-random IP IDs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 16 Apr 2001 12:10:19 -0700 From: Kris Kennaway <kris@obsecurity.org> To: Wes Peters <wes@softweyr.com>
On Mon, Apr 16, 2001 at 08:36:57AM -0600, Wes Peters wrote:
> Looks clean. The only comment I can find is: Why not have ip_randomid()
> return the ID in network byte order? It would save several HTONS macros
> trailing the ip_randomid() calls.
I can't think of anything off the top of my head, but there was some
reason why OpenBSD made this change:
diff -u -r1.12 -r1.13
--- ip_mroute.c 1999/01/08 01:04:17 1.12
+++ ip_mroute.c 1999/01/08 21:51:22 1.13
@@ -1397,7 +1397,8 @@
*/
ip_copy = mtod(mb_copy, struct ip *);
*ip_copy = multicast_encap_iphdr;
- ip_copy->ip_id = htons(ip_randomid());
+ ip_copy->ip_id = ip_randomid();
+ HTONS(ip_copy->ip_id);
ip_copy->ip_len = len;
ip_copy->ip_src = vifp->v_lcl_addr;
ip_copy->ip_dst = vifp->v_rmt_addr;
Presumably there was some reasoning there. Niels, can you shed any
light?
Kris
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message
- application/pgp-signature attachment: stored
- Next message: Cy Schubert - ITSD Open Systems Group: "Re: Interaction between ipfw, IPSEC and natd"
- Previous message: Kris Kennaway: "Re: non-random IP IDs"
- In reply to: Wes Peters: "Re: non-random IP IDs"
- Next in thread: E.B. Dreger: "Re: non-random IP IDs"
- Reply: E.B. Dreger: "Re: non-random IP IDs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|