Re: 2.6.8.1: ip auto-config accepts wrong packages

From: Randy.Dunlap
Date: Thu Aug 26 2004 - 11:44:17 EST


On Thu, 26 Aug 2004 12:31:12 +0200 Frank Steiner wrote:

| 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 :-((

Maybe fixed by
http://linux.bkbits.net:8080/linux-2.5/cset@412a4a00MfXRfzWB5kTFo9NXM1Q3hw?nav=index.html|ChangeSet@-7d

i.e., fix is already merged, I think.

--
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/