From: Tom Herbert <tom@herbertland.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: Tom Herbert <tom@quantonium.net>
Subject: [PATCH net-next 0/5] ipv6: Rework ext. headers infrastructure
Date: Tue, 22 Jan 2019 21:31:18 -0800 [thread overview]
Message-ID: <1548221483-3085-1-git-send-email-tom@quantonium.net> (raw)
This patch set implements an infrastructure to allow fine grained
control over IPv6 Destination and Hop-by-Hop TLV options. This
includes being able to registers handlers for receiving options as
well as a set of parameters that sets permissions for who may send a
TLV option and the preferred format of a list of options.
The goal of the patch is to enable broader use cases of IPv6 options,
including those for which non-privileged users can send options. In
order to curtail misuse of options in such cases, a number of
requirements on how the option may be sent and formatted is
enforced.
Particular features are:
- A single 256 entry table containing the information about each
TLV is defined. Lookups are simple offset accesses to the table
based on TLV type. Both receiving and sending properties of TLVs
are maintained in the table.
- Allow registration/deregistration of receive handlers for specific
TLVs.
- Describe the properties of sending different TLVs in a TLV parameter
table. The parameter table can be managed via netlink.
- Allow non-privileged users to send TLVs for which they have been
granted permission.
- Provide a deep validation of TLVs and TLV lists to enforce specific
limits and permission in order to thwart misuse of TLVs.
- Define a canonical format for sending TLVs that includes a
preferred order, option alignment, minimal padding between TLVs.
- Allow individual TLVs to be added or set in txoptions list on a
socket.
Tested: Write and read different TLVs on a socket via setsockopt
and getsockopt. Flow is add individual TLV, read back options,
set read option on new socket as a list. Verify options are
properly sent and received. Used a modified ip command in iproute2
to test managing the TLV parameter via netlink.
Tom Herbert (5):
exthdrs: Create exthdrs_options.c
exthdrs: Registration of TLV handlers and parameters
ip6tlvs: Add netlink interface
ip6tlvs: Validation of TX Destination and Hop-by-Hop options
ip6tlvs: API to set and remove individual TLVs from DO or HBH EH
include/net/ipv6.h | 76 ++
include/uapi/linux/in6.h | 58 ++
net/ipv6/Makefile | 2 +-
net/ipv6/datagram.c | 27 +-
net/ipv6/exthdrs.c | 389 +---------
net/ipv6/exthdrs_options.c | 1722 ++++++++++++++++++++++++++++++++++++++++++++
net/ipv6/ipv6_sockglue.c | 110 ++-
7 files changed, 2007 insertions(+), 377 deletions(-)
create mode 100644 net/ipv6/exthdrs_options.c
--
2.7.4
next reply other threads:[~2019-01-23 5:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 5:31 Tom Herbert [this message]
2019-01-23 5:31 ` [PATCH net-next 1/5] exthdrs: Create exthdrs_options.c Tom Herbert
2019-01-23 5:31 ` [PATCH net-next 2/5] exthdrs: Registration of TLV handlers and parameters Tom Herbert
2019-01-23 19:27 ` David Miller
2019-01-23 5:31 ` [PATCH net-next 3/5] ip6tlvs: Add netlink interface Tom Herbert
2019-01-23 5:31 ` [PATCH net-next 4/5] ip6tlvs: Validation of TX Destination and Hop-by-Hop options Tom Herbert
2019-01-23 5:31 ` [PATCH net-next 5/5] ip6tlvs: API to set and remove individual TLVs from DO or HBH EH Tom Herbert
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=1548221483-3085-1-git-send-email-tom@quantonium.net \
--to=tom@herbertland.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=tom@quantonium.net \
/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