in_addr_t instead of struct in_addr
This commit is contained in:
parent
6b2070c6e9
commit
92ff8a6a7e
|
@ -265,7 +265,7 @@ check_upnp_rule_against_permissions(const struct upnpperm * permary,
|
|||
void
|
||||
get_permitted_ext_ports(uint32_t * allowed,
|
||||
const struct upnpperm * permary, int n_perms,
|
||||
struct in_addr address, u_short iport)
|
||||
in_addr_t addr, u_short iport)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
@ -274,7 +274,7 @@ get_permitted_ext_ports(uint32_t * allowed,
|
|||
|
||||
for (i = n_perms - 1; i >= 0; i--)
|
||||
{
|
||||
if( (address.s_addr & permary[i].mask.s_addr)
|
||||
if( (addr & permary[i].mask.s_addr)
|
||||
!= (permary[i].address.s_addr & permary[i].mask.s_addr) )
|
||||
continue;
|
||||
if( (iport < permary[i].iport_min) || (permary[i].iport_max < iport))
|
||||
|
|
|
@ -51,7 +51,7 @@ check_upnp_rule_against_permissions(const struct upnpperm * permary,
|
|||
void
|
||||
get_permitted_ext_ports(uint32_t * allowed,
|
||||
const struct upnpperm * permary, int n_perms,
|
||||
struct in_addr address, u_short iport);
|
||||
in_addr_t addr, u_short iport);
|
||||
|
||||
#ifdef USE_MINIUPNPDCTL
|
||||
void
|
||||
|
|
|
@ -685,7 +685,7 @@ AddAnyPortMapping(struct upnphttp * h, const char * action, const char * ns)
|
|||
syslog(LOG_ERR, "inet_aton(%s) FAILED", int_ip);
|
||||
}
|
||||
get_permitted_ext_ports(allowed_eports, upnppermlist, num_upnpperm,
|
||||
address, iport);
|
||||
address.s_addr, iport);
|
||||
eport_above = eport_below = eport;
|
||||
for(;;) {
|
||||
/* loop invariant
|
||||
|
|
Loading…
Reference in New Issue