lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 29 Apr 2019 15:05:05 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Cc:     netdev@...r.kernel.org, roopa@...ulusnetworks.com
Subject: Re: [PATCH iproute2] ip: mroute: add fflush to print_mroute

On Fri, 26 Apr 2019 13:54:21 +0300
Nikolay Aleksandrov <nikolay@...ulusnetworks.com> wrote:

> Similar to other print functions we need to flush buffered data
> in order to work with pipes and output redirects.
> 
> After this patch ip monitor mroute &>log works properly.
> 
> Signed-off-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
> ---
>  ip/ipmroute.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/ip/ipmroute.c b/ip/ipmroute.c
> index b29c78e4cc86..ede09ca96412 100644
> --- a/ip/ipmroute.c
> +++ b/ip/ipmroute.c
> @@ -57,6 +57,7 @@ int print_mroute(struct nlmsghdr *n, void *arg)
>  	struct rtmsg *r = NLMSG_DATA(n);
>  	int len = n->nlmsg_len;
>  	struct rtattr *tb[RTA_MAX+1];
> +	FILE *fp = (FILE *)arg;

Applied, but the cast here is unnecessary in C.
So I removed it.

Powered by blists - more mailing lists