Add -W option for enabling workaround for buggy AP that handle broadcast flag incorrectly 43/225943/4 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix accepted/tizen_6.5_unified tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.104145 accepted/tizen/6.0/unified/hotfix/20201103.045349 accepted/tizen/6.5/unified/20211029.015201 accepted/tizen/unified/20200305.123244 submit/tizen/20200305.075617 submit/tizen_6.0/20201029.205504 submit/tizen_6.0_hotfix/20201102.192904 submit/tizen_6.0_hotfix/20201103.115104 submit/tizen_6.5/20211028.163901 tizen_6.0.m2_release tizen_6.5.m2_release
authorNishant Chaprana <n.chaprana@samsung.com>
Tue, 25 Feb 2020 14:41:51 +0000 (20:11 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Mon, 2 Mar 2020 09:53:34 +0000 (15:23 +0530)
commit8b8bd9142f5e039347b5931c54c7e2a852351e04
tree2573394801b2b159e0cebe3479b68584ba466c5f
parent3ded0d7ad87ce74e2a7944dde83222736e2bb39f
Add -W option for enabling workaround for buggy AP that handle broadcast flag incorrectly

Some routers/AP handle the DHCP broadcast flag incorrectly.
This means that some AP discard the DHCP packet if broadcast
flag is present and some discard it if broadcast flag is missing.

The workaround is to first send DISCOVER packet in INIT state without
broadcast flag. If there is a timeout we send the second packet with
broadcast flag set. In a case of second timeout the next DISCOVER will
not set broadcast flag etc.

In REBOOTING state the REQUEST packet will not set the broadcast flag.
If we do not get a reply, we switch to INIT state anyway which will
set the broadcast flag.

Change-Id: Ifd3adfe6693f51f0f331c6ebcdc7011e3be3a353
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
toys/pending/dhcp.c