Re: non-random IP IDs

From: Kris Kennaway (kris@obsecurity.org)
Date: 04/16/01


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




Relevant Pages

  • Re: AT&T Tilt continues the tradition of crappy Windows Mobile phones; what phone can I buy ins
    ... reason), give the XDA-Devs cooked ROM's a try. ... the iPhone is ruled out because tethering my ... the network through my phone, EDGE-only is simply not an option. ... settings was invalid because of a corrupt ring tone, ...
    (microsoft.public.pocketpc)
  • Re: Qualia Question
    ... Does it give us any reason to believe it shouldn't? ... The answer to both is no. Physics doesn't tell us what it feels like to be ... > anything because it would have no associations? ... In my design for a network which has the power to create intelligence, ...
    (comp.ai.philosophy)
  • Re: mail confusion
    ... > I'm sure someone could come up with a reason for a need for one, ... FQDNs to work properly. ... if I have my own personal TCP/IP network with no ... which are specifically designed to make use of DNS ...
    (Fedora)
  • Re: Likelihood of IT using a Packet Sniffer
    ... employer's network but tapped straight into the internet (not sure how ... wired network to a wireless one. ... I've tried explaining to him that the only reason they're going to be ... If you want to keep them from being able to read your personal email, ...
    (comp.security.firewalls)
  • Re: A VB6 fan asks... why do YOU stick with VB6???
    ... First they run over a network. ... The only reason to use the WinOS further are the great ... UserBase and the Direct3D-based Games - but there is ... costing more to actually support "open source" products. ...
    (microsoft.public.vb.general.discussion)