Date: Sat, 16 Jun 2012 06:24:06 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r237155 - projects/pf/head/sys/contrib/pf/net Message-ID: <201206160624.q5G6O6mH026947@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Sat Jun 16 06:24:05 2012 New Revision: 237155 URL: http://svn.freebsd.org/changeset/base/237155 Log: Fix for fallout from r236397: we need to zero entire sockaddr to make rn_match() work. This fixes matching on tables. Modified: projects/pf/head/sys/contrib/pf/net/pf_table.c Modified: projects/pf/head/sys/contrib/pf/net/pf_table.c ============================================================================== --- projects/pf/head/sys/contrib/pf/net/pf_table.c Sat Jun 16 05:06:43 2012 (r237154) +++ projects/pf/head/sys/contrib/pf/net/pf_table.c Sat Jun 16 06:24:05 2012 (r237155) @@ -1901,6 +1901,7 @@ pfr_match_addr(struct pfr_ktable *kt, st { struct sockaddr_in sin; + bzero(&sin, sizeof(sin)); sin.sin_len = sizeof(sin); sin.sin_family = AF_INET; sin.sin_addr.s_addr = a->addr32[0]; @@ -1915,6 +1916,7 @@ pfr_match_addr(struct pfr_ktable *kt, st { struct sockaddr_in6 sin6; + bzero(&sin6, sizeof(sin6)); sin6.sin6_len = sizeof(sin6); sin6.sin6_family = AF_INET6; bcopy(a, &sin6.sin6_addr, sizeof(sin6.sin6_addr));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206160624.q5G6O6mH026947>