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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170208.102340.236303502527636848.davem@davemloft.net>
Date:   Wed, 08 Feb 2017 10:23:40 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     bjorn@...k.no
Cc:     stefan.bruens@...h-aachen.de, linux-usb@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] sierra_net: Add support for IPv6 and Dual-Stack
 Link Sense Indications

From: Bjørn Mork <bjorn@...k.no>
Date: Wed, 08 Feb 2017 10:55:50 +0100

> Stefan Brüns <stefan.bruens@...h-aachen.de> writes:
> 
>> If a context is configured as dualstack ("IPv4v6"), the modem indicates
>> the context activation with a slightly different indication message.
>> The dual-stack indication omits the link_type (IPv4/v6) and adds
>> additional address fields.
> 
> Great!
> 
>> IPv6 LSIs are identical to IPv4 LSIs, but have a different link type.
>> +struct lsi_umts_dual {
>> +	struct lsi_umts lsi;
>> +	u8 pdp_addr4_len; /* NW-supplied PDP IPv4 address len */
>> +	u8 pdp_addr4[4];  /* NW-supplied PDP IPv4 address (bigendian)) */
>> +	u8 pdp_addr6_len; /* NW-supplied PDP IPv6 address len */
>> +	u8 pdp_addr6[16]; /* NW-supplied PDP IPv6 address (bigendian)) */
> 
> 
> Maybe use "struct in_addr" and "struct in6_addr" for all the address
> fields, making them a bit more accessible and avoiding having to define
> endianness explicitly?

Can't do that, it will add padding to the structure and not match
what is really in the header.

The problem is that we get a "u8" length first which starts the
address on an odd byte.

And we don't want to use "__packed" to fix this either.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ