From: Sven Eckelmann <sven@narfation.org>
To: Jean-Jacques Sarton <jj.sarton@t-online.de>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] PATCH alfred
Date: Tue, 01 Nov 2016 15:59:47 +0100 [thread overview]
Message-ID: <1578603.hzp8NWRWg0@bentobox> (raw)
In-Reply-To: <c87c6dac-72e5-c8ea-a2e1-50a173e53f16@t-online.de>
[-- Attachment #1: Type: text/plain, Size: 2131 bytes --]
On Dienstag, 1. November 2016 15:38:48 CET Jean-Jacques Sarton wrote:
> Copy & paste is not allways the right way.
> The previous patch for netlink.c what not OK. The right patch is:
>
Same problems as before and patch is also corrupt:
Applying patch #16799 using 'git am'
Description: PATCH alfred
Applying: PATCH alfred
fatal: corrupt patch at line 6
Patch failed at 0001 PATCH alfred
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
'git am' failed with exit status 128
>
>
> + return 0;
> +}
>
> diff --git a/netlink.c b/netlink.c
> index 1b5695c..445161d 100644
> --- a/netlink.c
> +++ b/netlink.c
> @@ -365,3 +365,30 @@ int get_tq_netlink(const char *mesh_iface, const
> struct ether_addr *mac,
>
> return 0;
> }
> +
> +int batadv_interface_check_netlink(const char *mesh_iface)
> +{
> + struct get_tq_netlink_opts opts = {
> + .tq = 0,
> + .found = false,
> + .query_opts = {
> + .err = 0,
> + },
> + };
> + int ret = 0;
> +
> + memset(&opts.mac, 0, ETH_ALEN);
> +
> + ret = netlink_query_common(mesh_iface, BATADV_CMD_GET_ORIGINATORS,
> + get_tq_netlink_cb, &opts.query_opts);
> + if (ret < 0)
> + return ret;
> +
> + memset(&opts.mac, 0, ETH_ALEN);
> + ret = netlink_query_common(mesh_iface,
> BATADV_CMD_GET_TRANSTABLE_GLOBAL,
> + get_tq_netlink_cb, &opts.query_opts);
> +
> + if (ret < 0)
> + return ret;
>
This is wrong BATADV_CMD_GET_TRANSTABLE_GLOBAL will not work with
get_tq_netlink_cb. And translate_mac_netlink will use
translate_mac_netlink_opts. Better create a dummy function which
only operates on "struct nlquery_opts" and returns NL_STOP on the
first call of this function.
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2016-11-01 14:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 14:38 [B.A.T.M.A.N.] PATCH alfred Jean-Jacques Sarton
2016-11-01 14:57 ` Simon Wunderlich
2016-11-01 14:59 ` Sven Eckelmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-11-01 14:17 Jean-Jacques Sarton
2016-11-01 14:27 ` Sven Eckelmann
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=1578603.hzp8NWRWg0@bentobox \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=jj.sarton@t-online.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;
as well as URLs for NNTP newsgroup(s).