From patchwork Tue Jun 23 15:51:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Gospodarek X-Patchwork-Id: 487705 X-Patchwork-Delegate: shemminger@vyatta.com 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 535DD14012C for ; Wed, 24 Jun 2015 01:53:14 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=cumulusnetworks.com header.i=@cumulusnetworks.com header.b=DRiB9DWA; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754738AbbFWPxJ (ORCPT ); Tue, 23 Jun 2015 11:53:09 -0400 Received: from mail-yk0-f180.google.com ([209.85.160.180]:34228 "EHLO mail-yk0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933254AbbFWPw4 (ORCPT ); Tue, 23 Jun 2015 11:52:56 -0400 Received: by ykfy125 with SMTP id y125so7847703ykf.1 for ; Tue, 23 Jun 2015 08:52:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cumulusnetworks.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8b1nbsoYxAhdFBqVxpRwP+5ObkU9t6DEdNqI7zeoJk8=; b=DRiB9DWA/M90ZOVDY1Z/Yaq1zYo0lh6BwS5xsyPTDlt+TRTwZIMesHBFgrLDGk6uhB Le3EE1emBSgONJjGAJNT3DHIV0c4WPcUbsPD33Zw1EdO00EgHhiLEkGbAL+SAMgwr6DW VUQZf0E7FPn3rJ6BFnevNhC2PKaisXqE7MqX4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8b1nbsoYxAhdFBqVxpRwP+5ObkU9t6DEdNqI7zeoJk8=; b=O7SY+x1Q1h+bwLQtFpCEXsFc7HSEXnlrriJoqPt+Qi0uMAMuKJWre4tm1ByT7y15eI KrZrvrGVvBvn7ehh5xHW6hnaTNdNYTpC4ylyOiuY7I0e0FFdhgVUKzqZDyUdvnH4M/lL 7U1mXx2rUi5+ZxNplxveozqqHAMGGTtq2fs8+/kcxNE75JtQCVLOIfpxv8NYsPvoIrZr 4ZTEenrRFJjO/ffYLXdfdyljRP+nbT/S4xzo6L90II0vYbQvFqW6mNfiK+26U8bsge75 BzEX2cXxLrNmGESe2Tgg4AbJ6iYQtD4McW++vCKTMf2vgwXhrlOpLkRSlVpDAaoStuNa w96g== X-Gm-Message-State: ALoCoQkxPXIlh6evlSvEeaqBcfW3nrk16ZTrVU4sMTifXlValucxpo2Mtw92yAMQGl3PEjtGvVpW X-Received: by 10.170.110.82 with SMTP id c79mr43284742ykb.113.1435074775965; Tue, 23 Jun 2015 08:52:55 -0700 (PDT) Received: from fedora-devel.home.greyhouse.net (cpe-24-211-243-155.nc.res.rr.com. [24.211.243.155]) by mx.google.com with ESMTPSA id o67sm10026284yha.41.2015.06.23.08.52.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2015 08:52:55 -0700 (PDT) From: Andy Gospodarek To: netdev@vger.kernel.org, davem@davemloft.net, ddutt@cumulusnetworks.com, sfeldma@gmail.com, alexander.duyck@gmail.com, hannes@stressinduktion.org, stephen@networkplumber.org Cc: Andy Gospodarek Subject: [PATCH net-next 3/3 v6] iproute2: add support to print 'linkdown' nexthop flag Date: Tue, 23 Jun 2015 11:51:51 -0400 Message-Id: <1435074711-924-4-git-send-email-gospo@cumulusnetworks.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1435074711-924-1-git-send-email-gospo@cumulusnetworks.com> References: <1435074711-924-1-git-send-email-gospo@cumulusnetworks.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Andy Gospodaerk Signed-off-by: Dinesh Dutt Acked-by: Scott Feldman --- ip/iproute.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ip/iproute.c b/ip/iproute.c index 3795baf..3369c49 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -451,6 +451,8 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) fprintf(fp, "offload "); if (r->rtm_flags & RTM_F_NOTIFY) fprintf(fp, "notify "); + if (r->rtm_flags & RTNH_F_LINKDOWN) + fprintf(fp, "linkdown "); if (tb[RTA_MARK]) { unsigned int mark = *(unsigned int*)RTA_DATA(tb[RTA_MARK]); if (mark) { @@ -670,6 +672,8 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) fprintf(fp, " onlink"); if (nh->rtnh_flags & RTNH_F_PERVASIVE) fprintf(fp, " pervasive"); + if (nh->rtnh_flags & RTNH_F_LINKDOWN) + fprintf(fp, " linkdown"); len -= NLMSG_ALIGN(nh->rtnh_len); nh = RTNH_NEXT(nh); }