[Bug 4273] DHCP Client: "xid" would be better to change per "dialog" window

bugzilla at busybox.net bugzilla at busybox.net
Fri Nov 18 01:05:00 UTC 2011


https://bugs.busybox.net/show_bug.cgi?id=4273

--- Comment #1 from Denys Vlasenko <vda.linux at googlemail.com> 2011-11-18 01:05:00 UTC ---
(In reply to comment #0)
> In networking/udhcp/dhcpc.c:
>   I can see that the "xid" is randomly created at discovery, but then we just
> use the same xid for ever. Ideally it would be better to increment the xid
> after each ACK or NAK, to make the next "dialog window" we use unquie from
> previous "dialog" window.

Why it would be good?

> This is 2 lines of code change

Thus makes code bigger. What problematic scenario are you trying to fix?

> Also once we have processed a ACK or NAK, then the moving xid would make sure
> we do not accpets a redundant ACK, NAK.

We stop waiting for answers after first ACK, so problem doesn't exist.
If we get NAK, we generate new xid already.

> Also note that i belive should check that xid is never 0, not sure what RFC
> says about that, but ensuring non zero value is probably best.

Sounds somewhat paranoid to me. Should we also check for 0xffffffff?

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list