From patchwork Sun Jun 23 16:24:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 253580 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 AA2892C04C8 for ; Mon, 24 Jun 2013 02:24:14 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751994Ab3FWQYL (ORCPT ); Sun, 23 Jun 2013 12:24:11 -0400 Received: from na3sys010aog107.obsmtp.com ([74.125.245.82]:48023 "HELO na3sys010aog107.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751764Ab3FWQYK (ORCPT ); Sun, 23 Jun 2013 12:24:10 -0400 Received: from mail-ea0-f178.google.com ([209.85.215.178]) (using TLSv1) by na3sys010aob107.postini.com ([74.125.244.12]) with SMTP ID DSNKUcchKUoddUbxyht34urcGarcSjfUnjAy@postini.com; Sun, 23 Jun 2013 09:24:10 PDT Received: by mail-ea0-f178.google.com with SMTP id l15so5500743eak.37 for ; Sun, 23 Jun 2013 09:24:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=5gxNpOP/Pa6qXqBhv2kNcOhpC5ff3PuL/99HlErivMg=; b=odUXx6IqY/hCFa+Z0YfKcEseaWhMq1zPpBoYQfzWyyewXqeBjew//lCy6vLIEftjsn cL5LZjH5FV3pCpl41FQ6FQm9oYef7ZrZz7N4iSdoMPJJonfXcyDiJG0Rx9ONDmbAE8CS blyI3NT7gfld6xbafymqIxivKla1CUpJzroTSNqcbufvFUAnrRqaFsKed+LGmxbUT+MN LCbYAF+2Y98CpNkdSdlPdjdWYouH86Sz8U3gL/bSPShrwsf6eCDmA4nyGagDvU+jLkdG 0X/X5ysnHXx5omwJk2WalEpnpkwrSylfXN8Fvtax5y7WF7uFNtZijZRvsNsex3j3ZYzc OORQ== X-Received: by 10.14.180.4 with SMTP id i4mr20608161eem.148.1372004648769; Sun, 23 Jun 2013 09:24:08 -0700 (PDT) X-Received: by 10.14.180.4 with SMTP id i4mr20608154eem.148.1372004648702; Sun, 23 Jun 2013 09:24:08 -0700 (PDT) Received: from mike.rapoport@ravellosystems.com (46-116-14-239.bb.netvision.net.il. [46.116.14.239]) by mx.google.com with ESMTPSA id a4sm22246436eez.0.2013.06.23.09.24.05 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 23 Jun 2013 09:24:07 -0700 (PDT) Received: by mike.rapoport@ravellosystems.com (sSMTP sendmail emulation); Sun, 23 Jun 2013 19:24:04 +0300 From: Mike Rapoport To: netdev@vger.kernel.org Cc: Stephen Hemminger , David Stevens , Thomas Graf , Mike Rapoport Subject: [PATCH iproute2 1/2] vxlan: introduce vxlan_parse_opt_create Date: Sun, 23 Jun 2013 19:24:02 +0300 Message-Id: <1372004643-24718-1-git-send-email-mike.rapoport@ravellosystems.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1372004543-24675-1-git-send-email-mike.rapoport@ravellosystems.com> References: <1372004543-24675-1-git-send-email-mike.rapoport@ravellosystems.com> X-Gm-Message-State: ALoCoQmROaIH9DBPTvO7Oo0QRy3jylJ2mTKnNwmPYL+ZenGHeashH5X62sBqnB6ysinMzhua/VRADUDXzRob1Ph5zp2FGw18ZijkEQ+AWztKf/n5kbFUFCRe2VWKyrsN+i/V3NQCvKJUvsAFy2PmvktJN0SDkIKprzQoKRY9ZHju3bI41Mt8Tiw= Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org for addition of vxlan_parse_opt_change, which is required to differentiate between create time only settings and the settings that can be changed with 'ip link set' Signed-off-by: Mike Rapoport --- ip/iplink_vxlan.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c index 1025326..92ddfb4 100644 --- a/ip/iplink_vxlan.c +++ b/ip/iplink_vxlan.c @@ -35,8 +35,8 @@ static void explain(void) fprintf(stderr, " TTL := { 1..255 | inherit }\n"); } -static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, - struct nlmsghdr *n) +static int vxlan_parse_opt_create(struct link_util *lu, int argc, char **argv, + struct nlmsghdr *n) { __u32 vni = 0; int vni_set = 0; @@ -187,6 +187,12 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, return 0; } +static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv, + struct nlmsghdr *n) +{ + return vxlan_parse_opt_create(lu, argc, argv, n); +} + static void vxlan_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) { __u32 vni;