lkml.org 
[lkml]   [2004]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.8.1: ip auto-config accepts wrong packages
Hi Mark,

in addition to the DEBUG flags I added two little debugging lines to make
sure the right code is executed.

ipconfig.c:
if (able & IC_BOOTP){
DBG(("calling get_random_btyes"));
get_random_bytes(&d->xid, sizeof(u32));

random.c:

void get_random_bytes(void *buf, int nbytes)
{
DEBUG_ENT("get_random_bytes entered\n");
if (sec_random_state) {
DEBUG_ENT("sec_random_state\n");
extract_entropy(sec_random_state, (char *) buf, nbytes,
EXTRACT_ENTROPY_SECONDARY);
}


And here is the output from boot.msg:


<4>IP-Config: Entered.
<4>calling get_random_btyes<7>random: get_random_bytes entered
<7>random: sec_random_state
<7>random: 0000 0000 : going to reseed secondary with 64 bits (32 of 0 requested)
<7>random: 0000 0000 : trying to extract 64 bits from primary
<7>random: 0000 0000 : debiting 0 bits from primary
<7>random: 0000 0000 : trying to extract 32 bits from secondary
<7>random: 0000 0000 : debiting 32 bits from secondary (unlimited)
<4>IP-Config: eth0 UP (able=1, xid=07196018)
<5>Sending BOOTP requests .<7>random: get_random_bytes entered
<7>random: sec_random_state
<7>random: 0000 0000 : going to reseed secondary with 64 bits (32 of 0 requested)
<7>random: 0000 0000 : trying to extract 64 bits from primary
<7>random: 0000 0000 : debiting 0 bits from primary
<7>random: 0000 0000 : trying to extract 32 bits from secondary
<7>random: 0000 0000 : debiting 32 bits from secondary (unlimited)
<6>tg3: eth0: Link is up at 100 Mbps, full duplex.
<6>tg3: eth0: Flow control is on for TX and on for RX.
<4>.DHCP/BOOTP: Got extension 1: ff ff ff 80
<4>DHCP/BOOTP: Got extension 3: 8d 54 01 82
<4>DHCP/BOOTP: Got extension 6: 81 bb d6 87
<4>DHCP/BOOTP: Got extension 17: 2f
<4>DHCP/BOOTP: Got extension 28: 8d 54 01 ff
<4>DHCP/BOOTP: Got extension 15: 62 69 6f 2e 69 66 69 2e 6c 6d 75 2e 64 65
<4> OK
<4>IP-Config: Got BOOTP answer from 141.84.1.132, my address is 141.84.1.167
...

So it looks like the code is executed, but the xid is always the
same. Just like the random module would not create a random number
but a constant :-) I'm not good enough in C to really understand
and further debug the code in random.c or ipconfig.c :-((

cu,
Frank

--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.321 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site