From patchwork Wed Jun 14 16:45:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dichtel X-Patchwork-Id: 775873 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 3wnsw61xWDz9s71 for ; Thu, 15 Jun 2017 02:46:14 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752427AbdFNQqA (ORCPT ); Wed, 14 Jun 2017 12:46:00 -0400 Received: from host.76.145.23.62.rev.coltfrance.com ([62.23.145.76]:53807 "EHLO proxy.6wind.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752228AbdFNQp5 (ORCPT ); Wed, 14 Jun 2017 12:45:57 -0400 Received: from elsass.dev.6wind.com (unknown [10.16.0.149]) by proxy.6wind.com (Postfix) with ESMTPS id 2275B8F553; Wed, 14 Jun 2017 18:45:44 +0200 (CEST) Received: from root by elsass.dev.6wind.com with local (Exim 4.84_2) (envelope-from ) id 1dLBQT-0001b5-1c; Wed, 14 Jun 2017 18:45:49 +0200 From: Nicolas Dichtel To: stephen@networkplumber.org Cc: netdev@vger.kernel.org, Nicolas Dichtel Subject: [PATCH iproute2] link_gre6: really support encaplimit option Date: Wed, 14 Jun 2017 18:45:42 +0200 Message-Id: <1497458742-6068-1-git-send-email-nicolas.dichtel@6wind.com> X-Mailer: git-send-email 2.8.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This option is documented in gre6 help, but was not supported. Fixes: af89576d7a8c ("iproute2: GRE over IPv6 tunnel support.") Signed-off-by: Nicolas Dichtel --- ip/link_gre6.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ip/link_gre6.c b/ip/link_gre6.c index 205bada78054..4d3d4b54210b 100644 --- a/ip/link_gre6.c +++ b/ip/link_gre6.c @@ -355,6 +355,18 @@ get_failed: invarg("invalid fwmark\n", *argv); flags &= ~IP6_TNL_F_USE_ORIG_FWMARK; } + } else if (strcmp(*argv, "encaplimit") == 0) { + NEXT_ARG(); + if (strcmp(*argv, "none") == 0) { + flags |= IP6_TNL_F_IGN_ENCAP_LIMIT; + } else { + __u8 uval; + + if (get_u8(&uval, *argv, 0) < -1) + invarg("invalid ELIM", *argv); + encap_limit = uval; + flags &= ~IP6_TNL_F_IGN_ENCAP_LIMIT; + } } else usage(); argc--; argv++;