Skip to content

Commit

Permalink
Issue proftpd#1282: When an interface/device name is configured, as f…
Browse files Browse the repository at this point in the history
…or `<VirtualHost>`, make sure we properly handle that name everywhere.

There was a place, in `fixup_servers()`, where we were still treating the
configured name as a DNS name/IP address, and *not* handling the case where
the name could be an interface/device.
  • Loading branch information
Castaglia committed Aug 7, 2021
1 parent dc867d1 commit 98fc471
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/dirtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* ProFTPD - FTP server daemon
* Copyright (c) 1997, 1998 Public Flood Software
* Copyright (c) 1999, 2000 MacGyver aka Habeeb J. Dihu <[email protected]>
* Copyright (c) 2001-2020 The ProFTPD Project team
* Copyright (c) 2001-2021 The ProFTPD Project team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -2582,7 +2582,12 @@ int fixup_servers(xaset_t *list) {
}

} else {
s->addr = pr_netaddr_get_addr(s->pool, s->ServerAddress, NULL);
int flags = PR_NETADDR_GET_ADDR_FL_INCL_DEVICE;

/* Make sure we properly handle a ServerAddress that is an
* interface/device name here (Issue #1282).
*/
s->addr = pr_netaddr_get_addr2(s->pool, s->ServerAddress, NULL, flags);
}

if (s->addr == NULL) {
Expand Down

0 comments on commit 98fc471

Please sign in to comment.