Skip to content

Commit

Permalink
netfilter: net/netfilter/ipvs/ip_vs_ftp.c: Remove use of NIPQUAD
Browse files Browse the repository at this point in the history
NIPQUAD has very few uses left.

Remove this use and make the code have the identical form of the only
other use of "%u,%u,%u,%u,%u,%u" in net/ipv4/netfilter/nf_nat_ftp.c

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Patrick McHardy <kaber@trash.net>
  • Loading branch information
Joe Perches authored and Patrick McHardy committed Mar 15, 2010
1 parent 7b4df05 commit 1da05f5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions net/netfilter/ipvs/ip_vs_ftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,14 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
*/
from.ip = n_cp->vaddr.ip;
port = n_cp->vport;
sprintf(buf, "%u,%u,%u,%u,%u,%u", NIPQUAD(from.ip),
(ntohs(port)>>8)&255, ntohs(port)&255);
snprintf(buf, sizeof(buf), "%u,%u,%u,%u,%u,%u",
((unsigned char *)&from.ip)[0],
((unsigned char *)&from.ip)[1],
((unsigned char *)&from.ip)[2],
((unsigned char *)&from.ip)[3],
ntohs(port) >> 8,
ntohs(port) & 0xFF);

buf_len = strlen(buf);

/*
Expand Down

0 comments on commit 1da05f5

Please sign in to comment.