Really fix accepting connections from "long" IPv6 address
Commit ee01ac19
(v4.3.23) enlarged player member hostaddr from 32 to
46 characters, but missed natstr member nat_hostaddr. player_main()
copies hostaddr to nat_hostaddr. Can overrun the destination, but
fortunately just into nat_hostname.
Impact:
* Can makes praddr() print only a suffix of the address. Used by play
command, for player messages during login and logout, and for
logging.
* Can make player_main()'s test for "same address as last time" fail,
causing extra "Last connection" messages.
* Matching against econfig key privip is not affected.
* Journal event login is not affected.
This commit is contained in:
parent
75619c3732
commit
3a7d7fa866
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ struct natstr {
|
|||
enum nat_status nat_stat;
|
||||
char nat_cnam[20]; /* country name */
|
||||
char nat_pnam[20]; /* representative */
|
||||
char nat_hostaddr[32]; /* host addr of last user */
|
||||
char nat_hostaddr[46]; /* host addr of last user */
|
||||
char nat_hostname[512]; /* hostname of last user, may be empty */
|
||||
char nat_userid[32]; /* userid of last user, may be empty */
|
||||
coord nat_xcap, nat_ycap; /* cap location in abs coords */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue