public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: roopa <roopa@cumulusnetworks•com>
To: Scott Feldman <sfeldma@gmail•com>
Cc: Netdev <netdev@vger•kernel.org>,
	shemminger@vyatta•com,
	"vyasevic@redhat•com" <vyasevic@redhat•com>,
	Wilson Kok <wkok@cumulusnetworks•com>
Subject: Re: [PATCH net-next] iproute2: bridge: support vlan range
Date: Sun, 18 Jan 2015 19:06:46 -0800	[thread overview]
Message-ID: <54BC74C6.6070702@cumulusnetworks.com> (raw)
In-Reply-To: <CAE4R7bA6f-f9zTL4iKn11xAWD7evbEGMb+b8zgrm780Hx0yg4w@mail.gmail.com>

On 1/18/15, 9:44 AM, Scott Feldman wrote:
> On Sun, Jan 18, 2015 at 1:11 AM, roopa <roopa@cumulusnetworks•com> wrote:
>> On 1/17/15, 5:35 PM, Scott Feldman wrote:
>>> On Thu, Jan 15, 2015 at 10:52 PM,  <roopa@cumulusnetworks•com> wrote:
>>>> From: Roopa Prabhu <roopa@cumulusnetworks•com>
>>>>
>>>> This patch adds vlan range support to bridge command
>>>> using the newly added vinfo flags BRIDGE_VLAN_INFO_RANGE_BEGIN and
>>>> BRIDGE_VLAN_INFO_RANGE_END.
>>>>
>>>> +                               vinfo.flags |=
>>>> BRIDGE_VLAN_INFO_RANGE_BEGIN;
>>>> +                       } else {
>>>> +                               vinfo.vid = atoi(*argv);
>>>> +                       }
>>>>                   } else if (strcmp(*argv, "self") == 0) {
>>>>                           flags |= BRIDGE_FLAGS_SELF;
>>>>                   } else if (strcmp(*argv, "master") == 0) {
>>>> @@ -67,7 +78,7 @@ static int vlan_modify(int cmd, int argc, char **argv)
>>>>                   argc--; argv++;
>>>>           }
>>>>
>>>> -       if (d == NULL || vid == -1) {
>>>> +       if (d == NULL || vinfo.vid == -1) {
>>> Where was vinfo.vid initialized to -1?  Maybe use vid rather than
>>> vinfo.vid in the code above where parsing the arg, and continue using
>>> vid and vid_end until final put of vinfo.
>>>
>> There is already a "memset(&vinfo, 0, sizeof(vinfo));"  in the code in the
>> beginning of the function.
> That's the problem...vinfo.vid is initialized to 0, not -1, so
> checking if vinfo.vid == -1 is always false.

ack, v2 coming ... thanks

      reply	other threads:[~2015-01-19  3:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16  6:52 [PATCH net-next] iproute2: bridge: support vlan range roopa
2015-01-18  1:35 ` Scott Feldman
2015-01-18  9:11   ` roopa
2015-01-18 17:44     ` Scott Feldman
2015-01-19  3:06       ` roopa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54BC74C6.6070702@cumulusnetworks.com \
    --to=roopa@cumulusnetworks$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sfeldma@gmail$(echo .)com \
    --cc=shemminger@vyatta$(echo .)com \
    --cc=vyasevic@redhat$(echo .)com \
    --cc=wkok@cumulusnetworks$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox