From: Sven Eckelmann <sven.eckelmann@gmx.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Marek Lindner <lindner_marek@yahoo.de>
Subject: Re: [B.A.T.M.A.N.] batman-adv gateway handling
Date: Sun, 31 Oct 2010 16:55:40 +0100 [thread overview]
Message-ID: <201010311655.42310.sven.eckelmann@gmx.de> (raw)
In-Reply-To: <201010311610.42160.lindner_marek@yahoo.de>
[-- Attachment #1: Type: Text/Plain, Size: 1701 bytes --]
Marek Lindner wrote:
> > > - char *buff, size_t count)
> > > + char *buff, size_t count)
> >
> > Why was the space removed?
>
> Should I move this into a separate patch ?
Sry, my fault. just forget it :)
> > > + if ((strnicmp(tmp_ptr, "kbit", 4) == 0) ||
> > > + (multi > 1))
> >
> > Why this indentation? And This should be on a single line (or I count
> > wrong).
>
> No, you are right. Will be fixed.
>
> > > + if ((gw_mode_tmp == GW_MODE_CLIENT) &&
> > > + (atomic_read(&bat_priv->gw_sel_class) == 0))
> > > + atomic_set(&bat_priv->gw_sel_class, 20);
> > > +
> > > + if ((gw_mode_tmp == GW_MODE_SERVER) &&
> > > + (atomic_read(&bat_priv->gw_bandwidth) == 0))
> > > + atomic_set(&bat_priv->gw_bandwidth, 41);
> >
> > Why setting that here? And why do you set gw_sel_class here to 20 (if it
> > is 0 before) and in softif_create to 0? Shouldn't it be set to 20 in
> > softif_create instead?
>
> The general idea was that if somebody activated client or gateway mode
> without setting gw_sel_class or gw_bandwidth to any value, it would use
> some default values.
> Moving these checks into softif_create() would only solve half of the
> problem because a user could set these variables to 0 and then start the
> client or server. At least the client mode requires the gw_sel_class
> variable value to be greater than 0.
Isn't it limited to 1 by BAT_ATTR_UINT? And if not (which I doubt) wouldn't be
the user still be able to set it to 0 after he changed it to client mode?
Best regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2010-10-31 15:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-24 1:13 [B.A.T.M.A.N.] batman-adv gateway handling Marek Lindner
2010-10-24 1:14 ` [B.A.T.M.A.N.] [PATCH 1/8] batman-adv: remove redundant gw_node_list_free() function Marek Lindner
2010-10-24 1:14 ` [B.A.T.M.A.N.] [PATCH 2/8] batman-adv: gateways silently drop DHCP requests Marek Lindner
2010-10-24 1:14 ` [B.A.T.M.A.N.] [PATCH 3/8] batman-adv: move gateway selection class into its own sysfs file Marek Lindner
2010-10-24 1:14 ` [B.A.T.M.A.N.] [PATCH 4/8] batman-adv: move gateway bandwidth " Marek Lindner
2010-10-24 1:14 ` [B.A.T.M.A.N.] [PATCH 5/8] batman-adv: cleanup gw mode sysfs file to only accept one value Marek Lindner
2010-10-24 1:14 ` [B.A.T.M.A.N.] [PATCH 6/8] batctl: support new gateway sysfs API Marek Lindner
2010-10-24 1:14 ` [B.A.T.M.A.N.] [PATCH 7/8] batman-adv: document gateway sysfs ABI Marek Lindner
2010-10-24 1:14 ` [B.A.T.M.A.N.] [PATCH 8/8] batman-adv: add gateway IPv6 support by filtering DHCPv6 messages Marek Lindner
2010-11-03 18:43 ` Linus Lüssing
2010-10-30 12:14 ` [B.A.T.M.A.N.] batman-adv gateway handling Sven Eckelmann
2010-10-31 15:10 ` Marek Lindner
2010-10-31 15:55 ` Sven Eckelmann [this message]
2010-11-01 11:14 ` Marek Lindner
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=201010311655.42310.sven.eckelmann@gmx.de \
--to=sven.eckelmann@gmx.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=lindner_marek@yahoo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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