From patchwork Thu Oct 21 10:47:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KOVACS Krisztian X-Patchwork-Id: 68571 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id DDB60B70F7 for ; Thu, 21 Oct 2010 21:48:37 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756634Ab0JUKsZ (ORCPT ); Thu, 21 Oct 2010 06:48:25 -0400 Received: from balu.sch.bme.hu ([152.66.208.40]:35604 "EHLO balu.sch.bme.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756551Ab0JUKsY (ORCPT ); Thu, 21 Oct 2010 06:48:24 -0400 Received: from [192.168.0.33] ([150.214.188.150]) by balu.sch.bme.hu (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTPSA id <0LAM00MLJZCMA796@balu.sch.bme.hu>; Thu, 21 Oct 2010 12:48:23 +0200 (CEST) Date: Thu, 21 Oct 2010 12:47:09 +0200 From: KOVACS Krisztian Subject: [PATCH v2 2/9] tproxy: added const specifiers to udp lookup functions In-reply-to: <20101021104709.5192.31249.stgit@este.odu> To: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org Cc: Balazs Scheidler , Patrick McHardy , David Miller Message-id: <20101021104709.5192.54276.stgit@este.odu> MIME-version: 1.0 X-Mailer: Evolution 2.28.3 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7BIT References: <20101021104709.5192.31249.stgit@este.odu> User-Agent: StGit/0.15 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Balazs Scheidler The parameters for various UDP lookup functions were non-const, even though they could be const. TProxy has some const references and instead of downcasting it, I added const specifiers along the path. Signed-off-by: Balazs Scheidler Signed-off-by: KOVACS Krisztian --- net/ipv6/udp.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 5acb356..33e3683 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -122,8 +122,8 @@ static void udp_v6_rehash(struct sock *sk) static inline int compute_score(struct sock *sk, struct net *net, unsigned short hnum, - struct in6_addr *saddr, __be16 sport, - struct in6_addr *daddr, __be16 dport, + const struct in6_addr *saddr, __be16 sport, + const struct in6_addr *daddr, __be16 dport, int dif) { int score = -1; @@ -239,8 +239,8 @@ exact_match: } static struct sock *__udp6_lib_lookup(struct net *net, - struct in6_addr *saddr, __be16 sport, - struct in6_addr *daddr, __be16 dport, + const struct in6_addr *saddr, __be16 sport, + const struct in6_addr *daddr, __be16 dport, int dif, struct udp_table *udptable) { struct sock *sk, *result;