Skip to content

Commit

Permalink
Follow-up fix for recent contribution.
Browse files Browse the repository at this point in the history
Set the new IP address only on success.
  • Loading branch information
oliverschmidt committed May 30, 2022
1 parent 15a04f7 commit 89475b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ip65/dhcp.s
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,11 @@ send_dhcprequest:

ldax #output_buffer
jsr udp_send
bcs :+ ; if we didn't send the message we probably need to wait for an ARP reply to come back.
bcs :++ ; if we didn't send the message we probably need to wait for an ARP reply to come back.

lda #dhcp_bound ; technically, we should wait till we get a DHCPACK message. but we'll assume success
sta dhcp_state

: ldx #3 ; set the new IP address
ldx #3 ; set the new IP address
: lda dhcp_ip,x
sta cfg_ip,x
dex
Expand Down

0 comments on commit 89475b3

Please sign in to comment.