Dynamic-host was implemented to ignore interface addresses with /32
(or /128 for IPv6) prefix lengths, since they are not useful for
synthesising addresses.
Due to a bug before 2.88, this didn't work for IPv4, and some have
used --dynamic-host=example.com,0.0.0.0,eth0 to do the equivalent of
--interface-name for such interfaces. When the bug was fixed in 2.88
these uses broke.
Since this behaviour seems to violate the principle of least surprise,
and since the 2.88 fix is breaking existing imstallations, this
commit removes the check on /32 and /128 prefix lengths to solve both
problems.
struct in_addr newaddr = addr->in.sin_addr;
if (int_name->flags & INP4)
- {
- if (netmask.s_addr == 0xffffffff)
- continue;
-
- newaddr.s_addr = (addr->in.sin_addr.s_addr & netmask.s_addr) |
- (int_name->proto4.s_addr & ~netmask.s_addr);
- }
+ newaddr.s_addr = (addr->in.sin_addr.s_addr & netmask.s_addr) |
+ (int_name->proto4.s_addr & ~netmask.s_addr);
/* check for duplicates. */
for (lp = int_name->addr; lp; lp = lp->next)
{
int i;
- /* No sense in doing /128. */
- if (prefixlen == 128)
- continue;
-
for (i = 0; i < 16; i++)
{
int bits = ((i+1)*8) - prefixlen;