[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5566DD13.2070800@brocade.com>
Date: Thu, 28 May 2015 10:17:07 +0100
From: Robert Shearman <rshearma@...cade.com>
To: Roopa Prabhu <roopa@...ulusnetworks.com>, <ebiederm@...ssion.com>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<vivek@...ulusnetworks.com>
Subject: Re: [PATCH net iproute2 v2 1/2] mpls: always set type as RTN_UNICAST
for route add/deletes
On 27/05/15 19:37, Roopa Prabhu wrote:
> From: Roopa Prabhu <roopa@...ulusnetworks.com>
>
> Kernel expects type RTN_UNICAST for mpls route/dels
>
> Signed-off-by: Vivek Venkataraman <vivek@...ulusnetworks.com>
> Signed-off-by: Roopa Prabhu <roopa@...ulusnetworks.com>
Reviewed-by: Robert Shearman <rshearma@...cade.com>
> ---
> ip/iproute.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/ip/iproute.c b/ip/iproute.c
> index 670a4c6..71c088b 100644
> --- a/ip/iproute.c
> +++ b/ip/iproute.c
> @@ -803,6 +803,7 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
> int scope_ok = 0;
> int table_ok = 0;
> int raw = 0;
> + int type_ok = 0;
>
> memset(&req, 0, sizeof(req));
>
> @@ -1095,6 +1096,7 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
> rtnl_rtntype_a2n(&type, *argv) == 0) {
> NEXT_ARG();
> req.r.rtm_type = type;
> + type_ok = 1;
> }
>
> if (matches(*argv, "help") == 0)
> @@ -1160,6 +1162,9 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
> }
> }
>
> + if (!type_ok && req.r.rtm_family == AF_MPLS)
> + req.r.rtm_type = RTN_UNICAST;
> +
> if (req.r.rtm_family == AF_UNSPEC)
> req.r.rtm_family = AF_INET;
>
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists