Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1576659

Re: [PATCH v3 1/2] sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/2] sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications
Date 2017-02-08 16:40 +0100
Message-ID <t8CvE-240-17@gated-at.bofh.it> (permalink)
References <t8pI5-2cw-13@gated-at.bofh.it> <t8pI5-2cw-11@gated-at.bofh.it> <t8xcB-77R-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

> Stefan Brüns <stefan.bruens@rwth-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.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v3 1/2] sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications Stefan Brüns <stefan.bruens@rwth-aachen.de> - 2017-02-08 03:00 +0100
  Re: [PATCH v3 1/2] sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications Bjørn Mork <bjorn@mork.no> - 2017-02-08 11:00 +0100
    Re: [PATCH v3 1/2] sierra_net: Add support for IPv6 and Dual-Stack  Link Sense Indications David Miller <davem@davemloft.net> - 2017-02-08 16:40 +0100

csiph-web