Changeset View
Changeset View
Standalone View
Standalone View
head/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c
Show First 20 Lines • Show All 1,945 Lines • ▼ Show 20 Lines | #define EPSV_REPLEN 33 | ||||
* As per RFC 2428, there are no addres components in the EPSV | * As per RFC 2428, there are no addres components in the EPSV | ||||
* response. So we'll go straight to getting the port. | * response. So we'll go straight to getting the port. | ||||
*/ | */ | ||||
while (*s && ISDIGIT(*s)) { | while (*s && ISDIGIT(*s)) { | ||||
ap *= 10; | ap *= 10; | ||||
ap += *s++ - '0'; | ap += *s++ - '0'; | ||||
} | } | ||||
if (!s) { | |||||
return 0; | |||||
} | |||||
if (*s == '|') | if (*s == '|') | ||||
s++; | s++; | ||||
if (*s == ')') | if (*s == ')') | ||||
s++; | s++; | ||||
if (*s == '\n') | if (*s == '\n') | ||||
s--; | s--; | ||||
/* | /* | ||||
* check for CR-LF at the end. | * check for CR-LF at the end. | ||||
▲ Show 20 Lines • Show All 229 Lines • Show Last 20 Lines |