From patchwork Sun Mar 13 21:33:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 86621 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 BC694B6F7D for ; Mon, 14 Mar 2011 08:34:52 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756569Ab1CMVem (ORCPT ); Sun, 13 Mar 2011 17:34:42 -0400 Received: from mail.windriver.com ([147.11.1.11]:49851 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755331Ab1CMVeb (ORCPT ); Sun, 13 Mar 2011 17:34:31 -0400 Received: from yow-pgortmak-d1.corp.ad.wrs.com (yow-pgortmak-d1.ottawa.windriver.com [128.224.146.65]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id p2DLYPoB016363; Sun, 13 Mar 2011 14:34:29 -0700 (PDT) From: Paul Gortmaker To: davem@davemloft.net Cc: netdev@vger.kernel.org, Allan.Stephens@windriver.com, Paul Gortmaker Subject: [PATCH net-next 02/26] tipc: Correct broadcast link peer info when displaying links Date: Sun, 13 Mar 2011 17:33:50 -0400 Message-Id: <1300052054-7531-3-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 1.7.3.3 In-Reply-To: <1300052054-7531-1-git-send-email-paul.gortmaker@windriver.com> References: <1300052054-7531-1-git-send-email-paul.gortmaker@windriver.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Allan Stephens Fixes a typo in the calculation of the network address of a node's own cluster when generating a response to the configuration command that lists all of the node's links. The correct mask value for a network address uses 1's for the 8-bit zone and 12-bit cluster parts and 0's for the 12-bit node part. Signed-off-by: Allan Stephens Signed-off-by: Paul Gortmaker --- net/tipc/node.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/tipc/node.c b/net/tipc/node.c index e4dba1d..d040d47 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c @@ -470,7 +470,7 @@ struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space) /* Add TLV for broadcast link */ - link_info.dest = htonl(tipc_own_addr & 0xfffff00); + link_info.dest = htonl(tipc_own_addr & 0xfffff000); link_info.up = htonl(1); strlcpy(link_info.str, tipc_bclink_name, TIPC_MAX_LINK_NAME); tipc_cfg_append_tlv(buf, TIPC_TLV_LINK_INFO, &link_info, sizeof(link_info));