[PATCH] fix off-by-one in rtnl_act_parse()
Thomas Haller
thaller at redhat.com
Fri Mar 28 09:17:48 EDT 2014
On Thu, 2014-03-27 at 08:28 +0000, Thomas Graf wrote:
> On 03/26/14 at 10:43pm, Cong Wang wrote:
> > Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
> > ---
> > lib/route/act.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/route/act.c b/lib/route/act.c
> > index b908b17..23f9393 100644
>
> LGTM
>
> Acked-by: Thomas Graf <tgraf at suug.ch>
>
Hi,
Cong, why do you think that libnl should shift the index "i" by one?
Sorry, I just don't see it :)
kernel also uses similar loops:
$ git grep -n for.*TCA_ACT_MAX_PRIO
net/sched/act_api.c:593: for (i = 1; i <= TCA_ACT_MAX_PRIO && tb[i]; i++) {
net/sched/act_api.c:871: for (i = 1; i <= TCA_ACT_MAX_PRIO && tb[i]; i++) {
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20140328/5f89ad00/attachment.sig>
More information about the libnl
mailing list