X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=net%2Fbootp.c;h=5e835a31ad786ada52102b23907777d662046f3f;hb=12f51da324678dbcddd3187c91d4c04f0abae980;hp=81066015f1c2ed28a4fb0ea1ec4bbeecec08047f;hpb=1a9c8f12f2f2824a047ebeb3ae342109677b48cc;p=karo-tx-uboot.git diff --git a/net/bootp.c b/net/bootp.c index 81066015f1..5e835a31ad 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -17,7 +17,7 @@ #ifdef CONFIG_STATUS_LED #include #endif -#ifdef CONFIG_BOOTP_RANDOM_DELAY +#if defined(CONFIG_BOOTP_RANDOM_DELAY) || defined(CONFIG_BOOTP_RANDOM_ID) #include "net_rand.h" #endif @@ -725,6 +725,9 @@ BootpRequest(void) * Bootp ID is the lower 4 bytes of our ethernet address * plus the current time in ms. */ +#ifdef CONFIG_BOOTP_RANDOM_ID + BootpID = rand(); +#else BootpID = ((ulong)NetOurEther[2] << 24) | ((ulong)NetOurEther[3] << 16) | ((ulong)NetOurEther[4] << 8) @@ -732,6 +735,7 @@ BootpRequest(void) BootpID += get_timer(0); BootpID = htonl(BootpID); bootp_add_id(BootpID); +#endif NetCopyLong(&bp->bp_id, &BootpID); /*