mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-09-07 14:54:28 +00:00
Fixed ARP setup.
In general I consider the approach of a netmask length a typical case of over-optimzation - incl. the typical downside of an "unnecessary" bug. However as the optimization is already present I opted to not remove it but rather fix the bug: So far the gateway was in usual environments only used if the target IP address differed already in the first byte from the local net IP addresses. Now the gateway is used correctly - even for i.e. the address 192.168.1.1 from the local net 192.168.0.x
This commit is contained in:
parent
8c247e1473
commit
f331f3f43f
@ -68,7 +68,7 @@ ap_packlen = 42 ; total length of packet
|
||||
|
||||
; gateway handling
|
||||
gw_mask: .res 4 ; inverted netmask
|
||||
gw_test: .res 4 ; gateway ip or:d with inverted netmask
|
||||
gw_test: .res 4 ; gateway ip or'd with inverted netmask
|
||||
gw_last: .res 1 ; netmask length - 1
|
||||
|
||||
; timeout
|
||||
@ -97,7 +97,7 @@ arp_calculate_gateway_mask:
|
||||
lda cfg_netmask,x
|
||||
eor #$ff
|
||||
cmp #$ff
|
||||
bne :+
|
||||
beq :+
|
||||
inc gw_last
|
||||
: sta gw_mask,x
|
||||
ora cfg_gateway,x
|
||||
|
Loading…
Reference in New Issue
Block a user