Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c534a27 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Netfilter: IRC: Copy nickname to proper address"

parents df4c1975 7d47f611
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -156,11 +156,12 @@ static bool mangle_ip(struct nf_conn *ct,
		*do not mangle the DCC Server IP
		*/
		if ((temp->server_ip == tuple->dst.u3.ip) &&
		    (temp->nickname_len == nick_end - nick_start) &&
		    (memcmp(nick_start, temp->nickname,
		    temp->nickname_len) == 0))
		    (temp->nickname_len == (nick_end - nick_start))) {
			if (memcmp(nick_start, temp->nickname,
				   temp->nickname_len) == 0)
				return false;
		}
	}
	return true;
}

@@ -197,7 +198,7 @@ static int handle_nickname(struct nf_conn *ct,
				kmalloc(i, GFP_ATOMIC);
			if (temp->nickname) {
				temp->nickname_len = i;
				memcpy(&temp->nickname,
				memcpy(temp->nickname,
				       nick_start, temp->nickname_len);
			} else {
				list_del(&temp->ptr);