Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: [PATCH 1/2] dhcpv6: Return -EISCONN when the expiry time
is inifinite (Daniel Wagner)
2. Re: [PATCH] rootnfs: Working rootnfs using connman (Daniel Wagner)
----------------------------------------------------------------------
Message: 1
Date: Thu, 1 Dec 2016 20:51:30 +0100
From: Daniel Wagner <[email protected]>
To: "Blanquicet-Melendez Jose (MM)"
<[email protected]>, Patrik Flykt
<[email protected]>, Feng Wang <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [PATCH 1/2] dhcpv6: Return -EISCONN when the expiry time
is inifinite
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252
Hi,
On 12/01/2016 03:47 PM, Blanquicet-Melendez Jose (MM) wrote:
> Hi,
>
>> Thanks very much for testing! And pointing out the issue!
>>
>> Both patches have been applied.
>>
>
> compiling this patch with gcc version 5.3.0 configured for target
> arm-poky-linux-gnueabi I get error "comparison between signed and
> unsigned integer expressions [-Werror=sign-compare]". In the past I was
> using version 4.8.4 and this error did not appear.
gcc gets better and better in detecting such things. So it is not
surprise to me that a newer version suddenly starts to complain.
I tried to figure out how to solve this. It seems the canonical
way according the man pages is to use a cast like:
- if (expired == 0xffffffff)
+ if (expired == (time_t)0xffffffff)
Wouldn't mind if someone with more knowledge could answer this question.
> In addition but not related with this patch I get:
>
> /opt/sources/connman/src/iptables.c: In function 'iptables_add_chain':
> /opt/sources/connman/src/iptables.c:622:10: error: cast increases required
> alignment of target type [-Werror=cast-align]
> error = (struct error_target *) entry_head->elems;
> ^
> /opt/sources/connman/src/iptables.c:640:13: error: cast increases required
> alignment of target type [-Werror=cast-align]
> standard = (struct ipt_standard_target *) entry_return->elems;
> ^
> /opt/sources/connman/src/iptables.c: In function 'find_existing_rule':
> /opt/sources/connman/src/iptables.c:982:12: error: cast increases required
> alignment of target type [-Werror=cast-align]
> xt_e_m = (struct xt_entry_match *)entry_test->elems;
> ^
> /opt/sources/connman/src/iptables.c:1014:17: error: cast increases required
> alignment of target type [-Werror=cast-align]
> tmp_xt_e_m = (struct xt_entry_match *)tmp_e->elems;
> ^
> /opt/sources/connman/src/iptables.c: In function 'dump_match':
> /opt/sources/connman/src/iptables.c:1275:10: error: cast increases required
> alignment of target type [-Werror=cast-align]
> match = (struct xt_entry_match *) entry->elems;
>
> Has someone updated the gcc version and getting these errors?
We had those buggers in the past once and...
commit d482e18ddf59be92427356420def4d8cdc8f2e7d
Author: Jukka Rissanen <[email protected]>
Date: Thu Aug 22 16:00:11 2013 +0300
iptables: Alignment fixes
The alignment of entry, offset and target was not calculated properly.
This by chance worked for x86 but not for ARM.
... fixed a bunch of them.
Hmm, I don't know how to fix that, any ideas?
A quick peek into the iptables code shows they do it with
memcpy (random example):
static struct ipt_entry *
generate_entry(const struct ipt_entry *fw,
struct xtables_rule_match *matches,
struct xt_entry_target *target)
{
unsigned int size;
struct xtables_rule_match *matchp;
struct ipt_entry *e;
size = sizeof(struct ipt_entry);
for (matchp = matches; matchp; matchp = matchp->next)
size += matchp->match->m->u.match_size;
e = xtables_malloc(size + target->u.target_size);
*e = *fw;
e->target_offset = size;
e->next_offset = size + target->u.target_size;
size = 0;
for (matchp = matches; matchp; matchp = matchp->next) {
memcpy(e->elems + size, matchp->match->m,
matchp->match->m->u.match_size);
size += matchp->match->m->u.match_size;
}
memcpy(e->elems + size, target, target->u.target_size);
return e;
}
So is memcpy the solution?
cheers,
daniel
------------------------------
Message: 2
Date: Thu, 1 Dec 2016 20:52:30 +0100
From: Daniel Wagner <[email protected]>
To: Pantelis Antoniou <[email protected]>
Cc: [email protected], Stephane Desneux <[email protected]>,
Koen Kooi <[email protected]>
Subject: Re: [PATCH] rootnfs: Working rootnfs using connman
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Pantelis,
>> At least if you don't want to do it, send a patch which adds it to TODO file
>> so we don't forget it.
>>
>
> I didn?t say that :) I just don?t have a setup that uses this scheme.
> If someone else has it and willing to share something that?s easy enough to
> replicate I can
> give it a whirl.
Glad to hear that!
Thanks for taking the task. Really appreciated.
cheers,
daniel
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 14, Issue 4
**************************************