From patchwork Wed Jun 10 06:47:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Gospodarek X-Patchwork-Id: 482465 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 B999214029D for ; Wed, 10 Jun 2015 16:49:02 +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=gzJFbeK7; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933314AbbFJGs4 (ORCPT ); Wed, 10 Jun 2015 02:48:56 -0400 Received: from mail-oi0-f48.google.com ([209.85.218.48]:32819 "EHLO mail-oi0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933288AbbFJGsu (ORCPT ); Wed, 10 Jun 2015 02:48:50 -0400 Received: by oiha141 with SMTP id a141so26256417oih.0 for ; Tue, 09 Jun 2015 23:48:49 -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=FgiF0Ltx0HAwpWDd0cWqzNn3stdjcUA5fVQtZGkepaY=; b=gzJFbeK7iS9a95aeuV1QjR2xbeCJ7LCSSKlSmAiASMQoYHYGcDJ+uUBkBe88YkgbbA +Js4CqKhNQ7lUJELo11vdUFe01p/iH4wd9c+9s5XXBXRYxI+BHZ3mQZodHfA7gmOTGkD seSDBvE3vFuoawzdByl2uk/2hwYvYpmcHigF0= 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=FgiF0Ltx0HAwpWDd0cWqzNn3stdjcUA5fVQtZGkepaY=; b=h3/8fGPYglwJuyf2nkDvgYcueg7CvC4KjcbpNaXakHa38/EC1SJTcKY3wV5Ga0bFAT BR7NKoCBrNkA7eFl/fGiNpBz6K9C8WESp6/Mnf/SNofI6mkO9G/sgyHwL7Fz2yLqBhTt OCJOh7GW+t5wq7G1tB7KfLz5s6JNgk9kqnP0e4SUPabTyZp8mjboXC8oeBIx9QqXTKLp wROq3DZjUtqVYRW+HoA3+JZryHU4WRc1V50ScY1NfUsM4bqDYnyksK0fIGCo8hw94hYt Fz4lk6VtNvQY3vvINwsllZW+aTTgDzymNgElEOD+Ji1TuD5rkTjfcAQcWZVmxGQzOa8R +CBw== X-Gm-Message-State: ALoCoQmUGqUAC/AL74KuuT3HX7jB9UA4MIIuZApxHS7m0+Tdui3VcSVEqwAbn0R4myHY4kOIq8T9 X-Received: by 10.182.186.4 with SMTP id fg4mr1426356obc.7.1433918929507; Tue, 09 Jun 2015 23:48:49 -0700 (PDT) Received: from localhost.localdomain ([32.144.185.16]) by mx.google.com with ESMTPSA id x123sm6119750oie.25.2015.06.09.23.48.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2015 23:48:49 -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 iproute2 3/3 v2] add support to print 'linkdown' nexthop flag Date: Wed, 10 Jun 2015 02:47:21 -0400 Message-Id: <1433918841-15576-4-git-send-email-gospo@cumulusnetworks.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1433918841-15576-1-git-send-email-gospo@cumulusnetworks.com> References: <1433918841-15576-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 --- 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); }