miniupnpd.c: comments in parselanaddr()
This commit is contained in:
parent
49780a99ea
commit
18db1145ea
|
@ -586,6 +586,7 @@ parselanaddr(struct lan_addr_s * lan_addr, const char * str)
|
||||||
p++;
|
p++;
|
||||||
if(*p=='.')
|
if(*p=='.')
|
||||||
{
|
{
|
||||||
|
/* parse mask in /255.255.255.0 format */
|
||||||
while(*p && (*p=='.' || isdigit(*p)))
|
while(*p && (*p=='.' || isdigit(*p)))
|
||||||
p++;
|
p++;
|
||||||
n = p - q;
|
n = p - q;
|
||||||
|
@ -598,6 +599,7 @@ parselanaddr(struct lan_addr_s * lan_addr, const char * str)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* it is a /24 format */
|
||||||
int nbits = atoi(q);
|
int nbits = atoi(q);
|
||||||
if(nbits > 32 || nbits < 0)
|
if(nbits > 32 || nbits < 0)
|
||||||
goto parselan_error;
|
goto parselan_error;
|
||||||
|
|
Loading…
Reference in New Issue