Commit fa913ddf authored by Patrick McHardy's avatar Patrick McHardy

[NETFILTER]: nf_conntrack_sip: clear address in parse_addr()

Some callers pass uninitialized structures, clear the address to make
sure later comparisions work properly.
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent c2f9c683
...@@ -145,6 +145,7 @@ static int parse_addr(const struct nf_conn *ct, const char *cp, ...@@ -145,6 +145,7 @@ static int parse_addr(const struct nf_conn *ct, const char *cp,
int family = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num; int family = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num;
int ret = 0; int ret = 0;
memset(addr, 0, sizeof(*addr));
switch (family) { switch (family) {
case AF_INET: case AF_INET:
ret = in4_pton(cp, limit - cp, (u8 *)&addr->ip, -1, &end); ret = in4_pton(cp, limit - cp, (u8 *)&addr->ip, -1, &end);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment