Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194903
b: refs/heads/master
c: 1da05f5
h: refs/heads/master
i:
  194901: 522b54d
  194899: b9bb26c
  194895: 1debdf3
v: v3
  • Loading branch information
Joe Perches authored and Patrick McHardy committed Mar 15, 2010
1 parent 4e13b25 commit baf17df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b4df05537f4e6c0c3524055ece7f99b5c98cc87
refs/heads/master: 1da05f50f6a766c7611102382f85183b4db96c2d
10 changes: 8 additions & 2 deletions trunk/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 baf17df

Please sign in to comment.