From patchwork Wed Oct 7 10:59:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roel kluin X-Patchwork-Id: 35257 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.176.167]) by ozlabs.org (Postfix) with ESMTP id EF472B7B7D for ; Wed, 7 Oct 2009 21:54:28 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758922AbZJGKwE (ORCPT ); Wed, 7 Oct 2009 06:52:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758904AbZJGKwD (ORCPT ); Wed, 7 Oct 2009 06:52:03 -0400 Received: from ey-out-2122.google.com ([74.125.78.27]:22986 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758881AbZJGKwB (ORCPT ); Wed, 7 Oct 2009 06:52:01 -0400 Received: by ey-out-2122.google.com with SMTP id 4so807892eyf.5 for ; Wed, 07 Oct 2009 03:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=i2qOD+yna6sh3eQxBck9cDLkjpDGcmw5mgeU+g9SuiI=; b=fTpx0hrZ+1buyvJpLudd/8h8FfxV375nCJKbzzaU1cp8WZJ+7wzAr98w38dzPU8Bt8 7T6woFUyktbUcsfvzgGTIUJ1Lwug+hBHqsHH+t8n8U9DvHwNrOsfT/n2n5zsFp6V3VkD F8egchFV8EXqpHLZYx5wWQ06F/mq9ghjml97k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=R0xS0K9E2+nbAXO1G1F7vkEIeAQIf/VUSV8kDcYngmiXo+8yIuCa49StTAoE2abwly VtlKglCId96xdG3X6kNYCrO+7X7ktnP83zyscKzh67IDXmTfAtOD4HihAO820tEY3CFT S9RwNG2Xw9f8E/oJnIc5nuUugzJ7LCLNMEib8= Received: by 10.211.156.13 with SMTP id i13mr3053668ebo.22.1254912654082; Wed, 07 Oct 2009 03:50:54 -0700 (PDT) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 10sm1502738eyz.2.2009.10.07.03.50.52 (version=SSLv3 cipher=RC4-MD5); Wed, 07 Oct 2009 03:50:53 -0700 (PDT) Message-ID: <4ACC749E.4060806@gmail.com> Date: Wed, 07 Oct 2009 12:59:42 +0200 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-2.7.b4.fc11 Thunderbird/3.0b4 MIME-Version: 1.0 To: linux-x25@vger.kernel.org, netdev@vger.kernel.org, "David S. Miller" , Andrew Morton Subject: [PATCH] x25: bit and/or confusion in x25_ioctl()? Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Looking at commit ebc3f64b864f it appears that this was intended and not the original, equivalent to `if (facilities.reverse & ~0x81)'. In x25_parse_facilities() that patch changed how facilities->reverse was set. No other bits were set than 0x80 and/or 0x01. Signed-off-by: Roel Kluin --- This is correct isn't it? -- 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/x25/af_x25.c b/net/x25/af_x25.c index 7fa9c7a..ca4dc28 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -1363,7 +1363,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) facilities.throughput > 0xDD) break; if (facilities.reverse && - (facilities.reverse | 0x81)!= 0x81) + (facilities.reverse & 0x81) != 0x81) break; x25->facilities = facilities; rc = 0;