ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
From: Martin Doucha <mdoucha@suse.cz>
To: Petr Vorel <petr.vorel@gmail.com>, ltp@lists.linux.it
Subject: Re: [LTP] [RFC PATCH v2 3/3] lapi/if_addr.h: Define IFA_FLAGS
Date: Fri, 1 Oct 2021 11:19:13 +0200	[thread overview]
Message-ID: <8868d50b-0f30-7570-5d26-d93d809e6cf6@suse.cz> (raw)
In-Reply-To: <20210930183058.5240-4-petr.vorel@gmail.com>

Hi,
commit message for this patch should be "Define IFA_F_NOPREFIXROUTE" but
that can be fixed during merge. Apart from that, the whole patchset
looks good.

Reviewed-by: Martin Doucha <mdoucha@suse.cz>

On 30. 09. 21 20:30, Petr Vorel wrote:
> and use it in icmp_rate_limit01.c.
> 
> This fixes error on toolchains with very old kernel headers, e.g.
> Buildroot sourcery-arm:
> 
> icmp_rate_limit01.c:82:3: error: 'IFA_F_NOPREFIXROUTE' undeclared (first use in this function)
>    IFA_F_NOPREFIXROUTE);
> 
> Fixed because IFA_F_NOPREFIXROUTE was added in 3.14 and the oldest
> system we still support is Cent0S 7 with 3.10 kernel.
> 
> NOTE: Cent0S 7 is obviously heavily patched thus it contains
> IFA_F_NOPREFIXROUTE and therefore CI build didn't catch this error.
> 
> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> ---
>  include/lapi/if_addr.h            | 3 +++
>  testcases/cve/icmp_rate_limit01.c | 3 ++-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/include/lapi/if_addr.h b/include/lapi/if_addr.h
> index 4e50a0a4e..0f7e44784 100644
> --- a/include/lapi/if_addr.h
> +++ b/include/lapi/if_addr.h
> @@ -12,5 +12,8 @@
>  # define IFA_FLAGS 8
>  #endif
>  
> +#ifndef IFA_F_NOPREFIXROUTE
> +# define IFA_F_NOPREFIXROUTE	0x200
> +#endif
>  
>  #endif /* LAPI_IF_ADDR_H__ */
> diff --git a/testcases/cve/icmp_rate_limit01.c b/testcases/cve/icmp_rate_limit01.c
> index b3a237b30..3ada32675 100644
> --- a/testcases/cve/icmp_rate_limit01.c
> +++ b/testcases/cve/icmp_rate_limit01.c
> @@ -27,11 +27,12 @@
>  #include <sys/socket.h>
>  #include <netinet/in.h>
>  #include <arpa/inet.h>
> -#include <linux/if_addr.h>
>  #include <linux/errqueue.h>
>  
>  #include <sched.h>
>  #include <limits.h>
> +
> +#include "lapi/if_addr.h"
>  #include "tst_test.h"
>  #include "tst_netdevice.h"
>  
> 


-- 
Martin Doucha   mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2021-10-01  9:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30 18:30 [LTP] [RFC PATCH v2 0/3] Fix old toolchain (< v3.14) Petr Vorel
2021-09-30 18:30 ` [LTP] [RFC PATCH v2 1/3] tst_netdevice.c: Drop redundant include Petr Vorel
2021-10-06 13:51   ` Cyril Hrubis
2021-09-30 18:30 ` [LTP] [RFC PATCH v2 2/3] lapi: Create if_addr.h and reuse it in rtnetlink.h Petr Vorel
2021-10-06 13:52   ` Cyril Hrubis
2021-09-30 18:30 ` [LTP] [RFC PATCH v2 3/3] lapi/if_addr.h: Define IFA_FLAGS Petr Vorel
2021-10-01  9:19   ` Martin Doucha [this message]
2021-10-02 17:23     ` Petr Vorel
2021-10-06 14:00   ` Cyril Hrubis
2021-10-06 19:08     ` Petr Vorel

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=8868d50b-0f30-7570-5d26-d93d809e6cf6@suse.cz \
    --to=mdoucha@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=petr.vorel@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).