ipv6: Extension header infrastructure
Subsystems (7)
v8 cover ipv6: Extension header infrastructure
The fundamental rationale here is to make various TLVs, in particular Hop-by-Hop and Destination options, usable, robust, scalable, and extensible to support emerging functionality.
Specifically, this patch set:
1) Allow modules to register support for Hop-by-Hop and Destination options. This is useful for development and deployment of new options.
2) Allow non-privileged users to set Hop-by-Hop and Destination options for their packets or connections. This is especially useful for options like Path MTU and IOAM options where the information in the options is both sourced and sinked by the application. The alternative to this would be to create more side interfaces so that the option can be enabled via the kernel-- such side interfaces would be overkill IMO.
3) In conjunction with #2, validation of the options being set by an application is done. The validation for non-privileged users is purposely strict, but even in the case of privileged user validation is useful to disallow allow application from sending gibberish (for instance, now a TLV could be created with a length exceeding the bound of the extension header).
4) Consolidate various TLV mechanisms. Segment routing should be able to use the same TLV parsing function, as should UDP options when they come into the kernel.
5) Option lookup on receive is O(1) instead of list scan.
Subsequent patch sets will include:
6) Allow setting specific (Hop-by-Hop and Destination) options on a socket. This would also allow some options to be set by application and some might be set by kernel.
7) Allow options processing to be done in the context of a socket. This will be useful for FAST and PMTU options.
8) Allow experimental IPv6 options in the same way that experimental TCP options are allowed.
9) Support a robust means of extension header insertion. Extension header insertion is a controversial mechanism that some router vendors are insisting upon (see ongoing discussion in 6man list). The way they are currently doing it breaks the stack (particularly ICMP and the way networks are debugged), with proper support we can at least mitigate the effects of the problems being created by extension header insertion.
10) Support IPv4 extension headers. This again attempts to address some horrendous and completely non-robust hacks that are currently being perpetuated by some router vendors. For instance, some middlebox implementations are currently insert into TCP or UDP payload their own data with the assumption that a peer device will restore correct data. If they ever miss fixing up the payload then we now have systematic silent data corruption (IMO, this is very dangerous in a large scale deployment!). We can offer a better approach...
Changes in this patch set:
- Reorganize extension header files to separate out common API components
- Create common TLV handler that will can be used in other use cases (e.g. segment routing TLVs, UDP options)
- Allow registration of TLV handlers
- Elaborate on the TLV tables to include more characteristics
- Add a netlink interface to set TLV parameters (such as alignment requirements, authorization to send, etc.)
- Enhance validation of TLVs being sent. Validation is strict (unless overridden by admin) following that sending clause of the robustness principle
- Allow non-privileged users to set Hop-by-Hop and Destination Options if authorized by the admin
v2:
- Fix build errors from missing include file.
v3:
- Fix kbuild issue for ipv6_opt_hdr declared inside parameter list in ipeh.h
v4:
- Resubmit
v5:
- Fix reverse christmas tree issue
v6:
- Address comments from Simon Horman
- Remove new EXTHDRS Kconfig symbol, just use IPV6 for now
- Split out introduction of parse_error for TLV parsing loop into its own patch
- Fix drop counters in HBH and destination options processing
- Add extack error messages in netlink code
- Added range of permissions in include/uapi/linux/ipeh.h
- Check that min data length is <= max data length when setting TLV attributes
v7:
- Fix incorrect index in checking for nonzero padding
- Use dev_net(skb->dev) in all cases of __IP6_INC_STATS for hopopts and destopts (addresses comment from Willem de Bruijin)
v8:
- Elaborate on justification for patches in the summary commit log
Tom Herbert (9):
ipeh: Fix destopts counters on drop
ipeh: Create exthdrs_options.c and ipeh.h
ipeh: Move generic EH functions to exthdrs_common.c
ipeh: Generic TLV parser
ipeh: Add callback to ipeh_parse_tlv to handle errors
ip6tlvs: Registration of TLV handlers and parameters
ip6tlvs: Add TX parameters
ip6tlvs: Add netlink interface
ip6tlvs: Validation of TX Destination and Hop-by-Hop options
include/net/ipeh.h | 209 ++++++++ include/net/ipv6.h | 12 +- include/uapi/linux/in6.h | 6 + include/uapi/linux/ipeh.h | 53 ++ net/dccp/ipv6.c | 2 +- net/ipv6/Makefile | 3 +- net/ipv6/calipso.c | 6 +- net/ipv6/datagram.c | 51 +- net/ipv6/exthdrs.c | 514 ++----------------- net/ipv6/exthdrs_common.c | 1216 ++++++++++++++++++++++++++++++++++++++++++++ net/ipv6/exthdrs_options.c | 342 +++++++++++++ net/ipv6/ipv6_sockglue.c | 39 +- net/ipv6/raw.c | 2 +- net/ipv6/tcp_ipv6.c | 2 +- net/ipv6/udp.c | 2 +- net/l2tp/l2tp_ip6.c | 2 +- net/sctp/ipv6.c | 2 +- 17 files changed, 1942 insertions(+), 521 deletions(-) create mode 100644 include/net/ipeh.h create mode 100644 include/uapi/linux/ipeh.h create mode 100644 net/ipv6/exthdrs_common.c create mode 100644 net/ipv6/exthdrs_options.c
Signature · 1 line
2.7.4
PATCH v8 1/9 ipeh: Fix destopts counters on drop
From: Tom Herbert <[email protected]>
Bump IPSTATS_MIB_INHDRERRORS when extension header limit is exceeded.
Only take net from skb->dev, don't use dst for counters.
--- net/ipv6/exthdrs.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
net/ipv6/exthdrs.c +8 -9
@@ -276,28 +276,25 @@ static const struct tlvtype_proc tlvprocdestopt_lst[] = {static int ipv6_destopt_rcv (struct sk_buff *skb) { -struct inet6_dev *idev =__in6_dev_get (skb->dev);struct inet6_skb_parm *opt =IP6CB (skb);#if IS_ENABLED (CONFIG_IPV6_MIP6 )__u16 dstbuf;#endif -struct dst_entry *dst =skb_dst (skb);struct net *net =dev_net (skb->dev);int extlen;if (!pskb_may_pull (skb,skb_transport_offset (skb) +8 ) || !pskb_may_pull (skb, (skb_transport_offset (skb) + ((skb_transport_header (skb)[1 ] +1 ) <<3 )))) { -__IP6_INC_STATS (dev_net (dst->dev), idev, -IPSTATS_MIB_INHDRERRORS ); -fail_and_free:kfree_skb (skb); -return -1 ; + goto fail; } extlen = (skb_transport_header (skb)[1 ] +1 ) <<3 ; -if (extlen > net->ipv6.sysctl.max_dst_opts_len) - goto fail_and_free; +if (extlen > net->ipv6.sysctl.max_dst_opts_len) { +kfree_skb (skb); + goto fail; + } opt->lastopt = opt->dst1 =skb_network_header_len (skb);#if IS_ENABLED (CONFIG_IPV6_MIP6 )
@@ -316,7 +313,9 @@ static int ipv6_destopt_rcv(struct sk_buff *skb)return 1 ; } -__IP6_INC_STATS (net, idev,IPSTATS_MIB_INHDRERRORS ); +fail: +__IP6_INC_STATS (dev_net (skb->dev),__in6_dev_get (skb->dev), +IPSTATS_MIB_INHDRERRORS );return -1 ; }
Signature · 1 line
2.7.4
PATCH v8 2/9 ipeh: Create exthdrs_options.c and ipeh.h
In reply to Tom HerbertFrom: Tom Herbert <[email protected]>
Create exthdrs_options.c to hold code related to specific Hop-by-Hop and Destination extension header options. Move related functions in exthdrs.c to the new file.
Create include net/ipeh.h to contain common definitions for IP extension headers.
--- include/net/ipeh.h | 22 +++++ include/net/ipv6.h | 1 + net/ipv6/Makefile | 2 +- net/ipv6/exthdrs.c | 204 --------------------------------------------- net/ipv6/exthdrs_options.c | 201 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 225 insertions(+), 205 deletions(-) create mode 100644 include/net/ipeh.h create mode 100644 net/ipv6/exthdrs_options.c
include/net/ipeh.h new file +22 -0
@@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _NET_IPEH_H +#define _NET_IPEH_H + +#include <linux/skbuff.h> + +/* +* Parsing tlv encoded headers. +* +* Parsing function "func" returns true, if parsing succeed +* and false, if it failed. +* It MUST NOT touch skb->h. +*/ +struct tlvtype_proc { +int type; +bool (*func)(struct sk_buff *skb,int offset); +}; + +extern const struct tlvtype_proc tlvprocdestopt_lst[]; +extern const struct tlvtype_proc tlvprochopopt_lst[]; + +#endif /* _NET_IPEH_H */
include/net/ipv6.h +1 -0
@@ -20,6 +20,7 @@#include <net/flow_dissector.h> #include <net/snmp.h> #include <net/netns/hash.h> +#include <net/ipeh.h> #define SIN6_LEN_RFC2133 24
net/ipv6/Makefile +1 -1
@@ -10,7 +10,7 @@ ipv6-objs := af_inet6.o anycast.o ip6_output.o ip6_input.o addrconf.o \ route.o ip6_fib.o ipv6_sockglue.o ndisc.o udp.o udplite.o \ raw.o icmp.o mcast.o reassembly.o tcp_ipv6.o ping.o \ exthdrs.o datagram.o ip6_flowlabel.o inet6_connection_sock.o \ - udp_offload.o seg6.o fib6_notifier.o + udp_offload.o seg6.o fib6_notifier.o exthdrs_options.o ipv6-offload := ip6_offload.o tcpv6_offload.o exthdrs_offload.o
net/ipv6/exthdrs.c +0 -204
228 lines not on this page · raw message
net/ipv6/exthdrs_options.c new file +201 -0
201 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v8 3/9 ipeh: Move generic EH functions to exthdrs_common.c
In reply to Tom HerbertFrom: Tom Herbert <[email protected]>
Move generic functions in exthdrs.c to new exthdrs_common.c so that exthdrs.c only contains functions that are specific to IPv6 processing, and exthdrs_common.c contains functions that are generic. These functions include those that will be used with IPv4 extension headers. Generic extension header related functions are prefixed by ipeh_.
--- include/net/ipeh.h | 12 ++++ include/net/ipv6.h | 9 --- net/dccp/ipv6.c | 2 +- net/ipv6/Makefile | 1 + net/ipv6/calipso.c | 6 +- net/ipv6/exthdrs.c | 138 -------------------------------------------- net/ipv6/exthdrs_common.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++ net/ipv6/ipv6_sockglue.c | 2 +- net/ipv6/raw.c | 2 +- net/ipv6/tcp_ipv6.c | 2 +- net/ipv6/udp.c | 2 +- net/l2tp/l2tp_ip6.c | 2 +- net/sctp/ipv6.c | 2 +- 13 files changed, 167 insertions(+), 157 deletions(-) create mode 100644 net/ipv6/exthdrs_common.c
include/net/ipeh.h +12 -0
@@ -19,4 +19,16 @@ struct tlvtype_proc {extern const struct tlvtype_proc tlvprocdestopt_lst[];extern const struct tlvtype_proc tlvprochopopt_lst[]; +struct ipv6_txoptions ; +struct ipv6_opt_hdr ; + +struct ipv6_txoptions *ipeh_dup_options (struct sock *sk, +struct ipv6_txoptions *opt); +struct ipv6_txoptions *ipeh_renew_options (struct sock *sk, +struct ipv6_txoptions *opt, +int newtype, +struct ipv6_opt_hdr *newopt); +struct ipv6_txoptions *ipeh_fixup_options (struct ipv6_txoptions *opt_space, +struct ipv6_txoptions *opt); +#endif /* _NET_IPEH_H */
include/net/ipv6.h +0 -9
@@ -429,15 +429,6 @@ int ip6_ra_control(struct sock *sk, int sel);int ipv6_parse_hopopts (struct sk_buff *skb); -struct ipv6_txoptions *ipv6_dup_options (struct sock *sk, -struct ipv6_txoptions *opt); -struct ipv6_txoptions *ipv6_renew_options (struct sock *sk, -struct ipv6_txoptions *opt, -int newtype, -struct ipv6_opt_hdr *newopt); -struct ipv6_txoptions *ipv6_fixup_options (struct ipv6_txoptions *opt_space, -struct ipv6_txoptions *opt); -bool ipv6_opt_accepted (const struct sock *sk,const struct sk_buff *skb,const struct inet6_skb_parm *opt); struct ipv6_txoptions *ipv6_update_options(struct sock *sk,
net/dccp/ipv6.c +1 -1
@@ -515,7 +515,7 @@ static struct sock *dccp_v6_request_recv_sock(const struct sock *sk,if (!opt) opt =rcu_dereference (np->opt);if (opt) { - opt =ipv6_dup_options (newsk, opt); + opt =ipeh_dup_options (newsk, opt);RCU_INIT_POINTER (newnp->opt, opt); }inet_csk (newsk)->icsk_ext_hdr_len =0 ;
net/ipv6/Makefile +1 -0
@@ -44,6 +44,7 @@ obj-$(CONFIG_IPV6_SIT) += sit.o obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o obj-$(CONFIG_IPV6_GRE) += ip6_gre.o obj-$(CONFIG_IPV6_FOU) += fou6.o +obj-$(CONFIG_IPV6) += exthdrs_common.o obj-y += addrconf_core.o exthdrs_core.o ip6_checksum.o ip6_icmp.o obj-$(CONFIG_INET) += output_core.o protocol.o $(ipv6-offload)
net/ipv6/calipso.c +3 -3
@@ -785,7 +785,7 @@ static int calipso_opt_update(struct sock *sk, struct ipv6_opt_hdr *hop) {struct ipv6_txoptions *old =txopt_get (inet6_sk (sk)), *txopts; - txopts =ipv6_renew_options (sk, old,IPV6_HOPOPTS , hop); + txopts =ipeh_renew_options (sk, old,IPV6_HOPOPTS , hop);txopt_put (old);if (IS_ERR (txopts))return PTR_ERR (txopts);
@@ -1207,7 +1207,7 @@ static int calipso_req_setattr(struct request_sock *req,if (IS_ERR (new))return PTR_ERR (new); - txopts =ipv6_renew_options (sk, req_inet->ipv6_opt,IPV6_HOPOPTS , new); + txopts =ipeh_renew_options (sk, req_inet->ipv6_opt,IPV6_HOPOPTS , new);kfree (new);
@@ -1244,7 +1244,7 @@ static void calipso_req_delattr(struct request_sock *req)if (calipso_opt_del (req_inet->ipv6_opt->hopopt, &new))return ;/* Nothing to do */ - txopts =ipv6_renew_options (sk, req_inet->ipv6_opt,IPV6_HOPOPTS , new); + txopts =ipeh_renew_options (sk, req_inet->ipv6_opt,IPV6_HOPOPTS , new);if (!IS_ERR (txopts)) { txopts =xchg (&req_inet->ipv6_opt, txopts);
net/ipv6/exthdrs.c +0 -138
144 lines not on this page · raw message
net/ipv6/exthdrs_common.c new file +144 -0
144 lines not on this page · raw message
net/ipv6/ipv6_sockglue.c +1 -1
@@ -427,7 +427,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, opt =rcu_dereference_protected (np->opt,lockdep_sock_is_held (sk)); - opt =ipv6_renew_options (sk, opt, optname, new); + opt =ipeh_renew_options (sk, opt, optname, new);kfree (new);if (IS_ERR (opt)) { retv =PTR_ERR (opt);
net/ipv6/raw.c +1 -1
@@ -889,7 +889,7 @@ static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) }if (flowlabel) opt =fl6_merge_options (&opt_space, flowlabel, opt); - opt =ipv6_fixup_options (&opt_space, opt); + opt =ipeh_fixup_options (&opt_space, opt); fl6.flowi6_proto = proto; fl6.flowi6_mark = ipc6.sockc.mark;
net/ipv6/tcp_ipv6.c +1 -1
@@ -1250,7 +1250,7 @@ static struct sock *tcp_v6_syn_recv_sock(const struct sock *sk, struct sk_buff *if (!opt) opt =rcu_dereference (np->opt);if (opt) { - opt =ipv6_dup_options (newsk, opt); + opt =ipeh_dup_options (newsk, opt);RCU_INIT_POINTER (newnp->opt, opt); }inet_csk (newsk)->icsk_ext_hdr_len =0 ;
net/ipv6/udp.c +1 -1
@@ -1391,7 +1391,7 @@ int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) }if (flowlabel) opt =fl6_merge_options (&opt_space, flowlabel, opt); - opt =ipv6_fixup_options (&opt_space, opt); + opt =ipeh_fixup_options (&opt_space, opt); ipc6.opt = opt; fl6.flowi6_proto = sk->sk_protocol;
net/l2tp/l2tp_ip6.c +1 -1
@@ -590,7 +590,7 @@ static int l2tp_ip6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) }if (flowlabel) opt =fl6_merge_options (&opt_space, flowlabel, opt); - opt =ipv6_fixup_options (&opt_space, opt); + opt =ipeh_fixup_options (&opt_space, opt); ipc6.opt = opt; fl6.flowi6_proto = sk->sk_protocol;
net/sctp/ipv6.c +1 -1
@@ -441,7 +441,7 @@ static void sctp_v6_copy_ip_options(struct sock *sk, struct sock *newsk)rcu_read_lock (); opt =rcu_dereference (np->opt);if (opt) { - opt =ipv6_dup_options (newsk, opt); + opt =ipeh_dup_options (newsk, opt);if (!opt)pr_err ("%s: Failed to copy ip options\n" , __func__); }
Signature · 1 line
2.7.4
PATCH v8 4/9 ipeh: Generic TLV parser
In reply to Tom HerbertFrom: Tom Herbert <[email protected]>
Create a generic TLV parser. This will be used with various extension headers that carry options including Destination, Hop-by-Hop, Segment Routing TLVs, and other cases of simple stateless TLV parsing.
--- include/net/ipeh.h | 11 ++++ net/ipv6/exthdrs.c | 142 ++-------------------------------------------- net/ipv6/exthdrs_common.c | 137 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+), 136 deletions(-)
include/net/ipeh.h +11 -0
@@ -31,4 +31,15 @@ struct ipv6_txoptions *ipeh_renew_options(struct sock *sk,struct ipv6_txoptions *ipeh_fixup_options (struct ipv6_txoptions *opt_space,struct ipv6_txoptions *opt); +/* The generic TLV parser assumes that the type value of PAD1 is 0, and PADN +* is 1. This is true for IPv6 Destination and Hop-by-Hop Options. For Segment +* Routing TLVs, PAD1 is also 0, however PADN is 4 so the latter necessitates +* some change to the parser to support Segment Routing TLVs. +*/ +#define IPEH_TLV_PAD1 0 +#define IPEH_TLV_PADN 1 + +bool ipeh_parse_tlv (const struct tlvtype_proc *procs,struct sk_buff *skb, +int max_count,int off,int len); +#endif /* _NET_IPEH_H */
net/ipv6/exthdrs.c +6 -136
160 lines not on this page · raw message
net/ipv6/exthdrs_common.c +137 -0
140 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v8 5/9 ipeh: Add callback to ipeh_parse_tlv to handle errors
In reply to Tom HerbertFrom: Tom Herbert <[email protected]>
Add a callback function to ipeh_parse_tlv so that the caller can handler parsing errors in an appropriate way.
The enum ipeh_parse_errors contains the various errors and the particular error is an argument of the callback.
ipv6_parse_error is the callback function for parsing IPv6 TLVs. This mostly subsumes the functionality of ip6_tlvopt_unknown which is removed.
The callback is called at various points in ipeh_parse_tlv when an error is encountered. If the callback returns false then the packet is discarded, else on true being returned the error is not fatal and TLV processing continues (for instance, an unknown TLV is to be ignored).
--- include/net/ipeh.h | 17 +++++++++- net/ipv6/exthdrs.c | 55 ++++++++++++++++++++++++++++++-- net/ipv6/exthdrs_common.c | 80 ++++++++++++++++++----------------------------- 3 files changed, 99 insertions(+), 53 deletions(-)
include/net/ipeh.h +16 -1
@@ -31,6 +31,19 @@ struct ipv6_txoptions *ipeh_renew_options(struct sock *sk,struct ipv6_txoptions *ipeh_fixup_options (struct ipv6_txoptions *opt_space,struct ipv6_txoptions *opt); +/* Generic extension header TLV parser */ + +enum ipeh_parse_errors { +IPEH_PARSE_ERR_PAD1 ,/* Excessive PAD1 */ +IPEH_PARSE_ERR_PADN ,/* Excessive PADN */ +IPEH_PARSE_ERR_PADNZ ,/* Non-zero padding data */ +IPEH_PARSE_ERR_EH_TOOBIG ,/* Length of EH exceeds limit */ +IPEH_PARSE_ERR_OPT_TOOBIG ,/* Option size exceeds limit */ +IPEH_PARSE_ERR_OPT_TOOMANY ,/* Option count exceeds limit */ +IPEH_PARSE_ERR_OPT_UNK_DISALW ,/* Unknown option disallowed */ +IPEH_PARSE_ERR_OPT_UNK ,/* Unknown option */ +}; +/* The generic TLV parser assumes that the type value of PAD1 is 0, and PADN * is 1. This is true for IPv6 Destination and Hop-by-Hop Options. For Segment * Routing TLVs, PAD1 is also 0, however PADN is 4 so the latter necessitates
@@ -40,6 +53,8 @@ struct ipv6_txoptions *ipeh_fixup_options(struct ipv6_txoptions *opt_space,#define IPEH_TLV_PADN 1bool ipeh_parse_tlv (const struct tlvtype_proc *procs,struct sk_buff *skb, -int max_count,int off,int len); +int max_count,int off,int len, +bool (*parse_error)(struct sk_buff *skb, +int off,enum ipeh_parse_errors error));#endif /* _NET_IPEH_H */
net/ipv6/exthdrs.c +53 -2
73 lines not on this page · raw message
net/ipv6/exthdrs_common.c +30 -50
133 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v8 6/9 ip6tlvs: Registration of TLV handlers and parameters
In reply to Tom HerbertFrom: Tom Herbert <[email protected]>
Create a single TLV parameter table that holds meta information for IPv6 Hop-by-Hop and Destination TLVs. The data structure is composed of a 256 element array of u8's (one entry for each TLV type to allow O(1) lookup). Each entry provides an offset into an array of TLV proc data structures which follows the array of u8s. The TLV proc data structure contains parameters and handler functions for receiving and transmitting TLVs. The zero'th element in the TLV proc array provides default parameters for TLVs.
A class attribute indicates the type of extension header in which the TLV may be used (e.g. Hop-by-Hop options, Destination options, or Destination options before the routing header).
Functions are defined to manipulate entries in the TLV parameter table.
* tlv_{set|unset}_proc set a TLV proc entry (ops and parameters)
* tlv_{set|unset}_params set parameters only
Receive TLV lookup and processing is modified to be a lookup in the TLV parameter table. An init table containing parameters for TLVs supported by the kernel is used to initialize the TLV table.
--- include/net/ipeh.h | 107 +++++++++++++++++-- include/net/ipv6.h | 3 + include/uapi/linux/ipeh.h | 16 +++ net/ipv6/exthdrs.c | 14 ++- net/ipv6/exthdrs_common.c | 261 ++++++++++++++++++++++++++++++++++++++++++--- net/ipv6/exthdrs_options.c | 63 +++++++---- 6 files changed, 416 insertions(+), 48 deletions(-) create mode 100644 include/uapi/linux/ipeh.h
include/net/ipeh.h +100 -7
@@ -11,13 +11,105 @@* and false, if it failed. * It MUST NOT touch skb->h. */ -struct tlvtype_proc { -int type; -bool (*func)(struct sk_buff *skb,int offset); +struct tlv_ops { +bool (*func)(unsigned int class,struct sk_buff *skb,int offset); }; -extern const struct tlvtype_proc tlvprocdestopt_lst[]; -extern const struct tlvtype_proc tlvprochopopt_lst[]; +struct tlv_rx_params { +unsigned char class :4 ; +}; + +struct tlv_tx_params { +}; + +struct tlv_params { +struct tlv_rx_params r; +struct tlv_tx_params t; +}; + +struct tlv_proc { +struct tlv_ops ops; +struct tlv_params params; +}; + +struct tlv_type { +struct tlv_proc proc; +}; + +struct tlv_proc_init { +int type; +struct tlv_proc proc; +}; + +struct tlv_param_table_data { +unsigned char entries[256 ]; +unsigned char count; +struct rcu_head rcu; +struct tlv_type types[0 ]; +}; + +struct tlv_param_table { +struct tlv_param_table_data __rcu *data; +}; + +extern struct tlv_param_table ipv6_tlv_param_table; + +int __ipeh_tlv_set (struct tlv_param_table *tlv_param_table, +unsigned char type,const struct tlv_params *params, +const struct tlv_ops *ops); + +static inline int ipeh_tlv_set_params (struct tlv_param_table *tlv_param_table, +unsigned char type, +const struct tlv_params *params) +{ +return __ipeh_tlv_set (tlv_param_table, type, params,NULL ); +} + +static inline int ipeh_tlv_set_proc (struct tlv_param_table *tlv_param_table, +unsigned char type, +const struct tlv_proc *proc) +{ +return __ipeh_tlv_set (tlv_param_table, type, + &proc->params, &proc->ops); +} + +int __ipeh_tlv_unset (struct tlv_param_table *tlv_param_table, +unsigned char type,bool params_only); + +static inline int ipeh_tlv_unset_params (struct tlv_param_table *tlv_param_table, +unsigned char type) +{ +return __ipeh_tlv_unset (tlv_param_table, type, true); +} + +static inline int ipeh_tlv_unset_proc (struct tlv_param_table *tlv_param_table, +unsigned char type) +{ +return __ipeh_tlv_unset (tlv_param_table, type, false); +} + +/* ipeh_tlv_get_proc_by_type assumes rcu_read_lock is held */ +static inline struct tlv_proc *ipeh_tlv_get_proc_by_type ( +struct tlv_param_table *tlv_param_table,unsigned char type) +{ +struct tlv_param_table_data *tpt = +rcu_dereference (tlv_param_table->data); + +return &tpt->types[tpt->entries[type]].proc; +} + +/* ipeh_tlv_get_proc assumes rcu_read_lock is held */ +static inline struct tlv_proc *ipeh_tlv_get_proc ( +struct tlv_param_table *tlv_param_table, +const __u8 *tlv) +{ +return ipeh_tlv_get_proc_by_type (tlv_param_table, tlv[0 ]); +} + +int ipeh_exthdrs_init (struct tlv_param_table *tlv_param_table, +const struct tlv_proc_init *init_params, +int num_init_params); +void ipeh_exthdrs_fini (struct tlv_param_table *tlv_param_table);struct ipv6_txoptions ;struct ipv6_opt_hdr ;
@@ -52,8 +144,9 @@ enum ipeh_parse_errors {#define IPEH_TLV_PAD1 0#define IPEH_TLV_PADN 1 -bool ipeh_parse_tlv (const struct tlvtype_proc *procs,struct sk_buff *skb, -int max_count,int off,int len, +bool ipeh_parse_tlv (unsigned int class, +struct tlv_param_table *tlv_param_table, +struct sk_buff *skb,int max_count,int off,int len,bool (*parse_error)(struct sk_buff *skb,int off,enum ipeh_parse_errors error));
include/net/ipv6.h +3 -0
@@ -429,6 +429,9 @@ int ip6_ra_control(struct sock *sk, int sel);int ipv6_parse_hopopts (struct sk_buff *skb); +int ipv6_exthdrs_options_init (void ); +void ipv6_exthdrs_options_exit (void ); +bool ipv6_opt_accepted (const struct sock *sk,const struct sk_buff *skb,const struct inet6_skb_parm *opt); struct ipv6_txoptions *ipv6_update_options(struct sock *sk,
include/uapi/linux/ipeh.h new file +16 -0
@@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* ipeh.h - IP extension header TLV management */ + +#ifndef _UAPI_LINUX_IPEH_H +#define _UAPI_LINUX_IPEH_H + +/* Flags for EH type that can use a TLV option */ +#define IPEH_TLV_CLASS_FLAG_HOPOPT BIT(0) +#define IPEH_TLV_CLASS_FLAG_RTRDSTOPT BIT(1) +#define IPEH_TLV_CLASS_FLAG_DSTOPT BIT(2) + +#define IPEH_TLV_CLASS_FLAG_MASK (IPEH_TLV_CLASS_FLAG_HOPOPT | \ + IPEH_TLV_CLASS_FLAG_RTRDSTOPT | \ + IPEH_TLV_CLASS_FLAG_DSTOPT) + +#endif /* _UAPI_LINUX_IPEH_H */
net/ipv6/exthdrs.c +11 -3
@@ -47,6 +47,7 @@#ifdef CONFIG_IPV6_SEG6_HMAC #include <net/seg6_hmac.h> #endif +#include <uapi/linux/ipeh.h> #include <linux/uaccess.h>
@@ -132,7 +133,8 @@ static int ipv6_destopt_rcv(struct sk_buff *skb) dstbuf = opt->dst1;#endif -if (ipeh_parse_tlv (tlvprocdestopt_lst, skb, +if (ipeh_parse_tlv (IPEH_TLV_CLASS_FLAG_DSTOPT , + &ipv6_tlv_param_table, skb, init_net.ipv6.sysctl.max_dst_opts_cnt,2 , extlen -2 , ipv6_parse_error)) { skb->transport_header += extlen;
@@ -517,8 +519,13 @@ int __init ipv6_exthdrs_init(void)if (ret) goto out_destopt; + ret =ipv6_exthdrs_options_init (); +if (ret) + goto out_nodata; out:return ret; +out_nodata: +inet6_del_protocol (&nodata_protocol,IPPROTO_NONE ); out_destopt:inet6_del_protocol (&destopt_protocol,IPPROTO_DSTOPTS ); out_rthdr:
@@ -528,6 +535,7 @@ int __init ipv6_exthdrs_init(void)void ipv6_exthdrs_exit (void ) { +ipv6_exthdrs_options_exit ();inet6_del_protocol (&nodata_protocol,IPPROTO_NONE );inet6_del_protocol (&destopt_protocol,IPPROTO_DSTOPTS );inet6_del_protocol (&rthdr_protocol,IPPROTO_ROUTING );
@@ -558,8 +566,8 @@ int ipv6_parse_hopopts(struct sk_buff *skb) goto fail_and_free; opt->flags |=IP6SKB_HOPBYHOP ; -if (ipeh_parse_tlv (tlvprochopopt_lst, skb, - init_net.ipv6.sysctl.max_hbh_opts_cnt, +if (ipeh_parse_tlv (IPEH_TLV_CLASS_FLAG_HOPOPT , &ipv6_tlv_param_table, + skb, init_net.ipv6.sysctl.max_hbh_opts_cnt,2 , extlen -2 , ipv6_parse_error)) { skb->transport_header += extlen; opt =IP6CB (skb);
net/ipv6/exthdrs_common.c +245 -16
294 lines not on this page · raw message
net/ipv6/exthdrs_options.c +41 -22
107 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v8 7/9 ip6tlvs: Add TX parameters
In reply to Tom HerbertFrom: Tom Herbert <[email protected]>
Define a number of transmit parameters for TLV Parameter table definitions. These will be used for validating TLVs that are set on a socket.
--- include/net/ipeh.h | 18 ++++++++++++++++ include/uapi/linux/ipeh.h | 8 +++++++ net/ipv6/exthdrs_common.c | 53 +++++++++++++++++++++++++++++++++++++++++++++- net/ipv6/exthdrs_options.c | 45 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 123 insertions(+), 1 deletion(-)
include/net/ipeh.h +18 -0
@@ -20,6 +20,17 @@ struct tlv_rx_params { };struct tlv_tx_params { +unsigned char admin_perm :2 ; +unsigned char user_perm :2 ; +unsigned char class :3 ; +unsigned char rsvd :1 ; +unsigned char align_mult :4 ; +unsigned char align_off :4 ; +unsigned char data_len_mult :4 ; +unsigned char data_len_off :4 ; +unsigned char min_data_len; +unsigned char max_data_len; +unsigned short preferred_order; };struct tlv_params {
@@ -54,6 +65,13 @@ struct tlv_param_table {extern struct tlv_param_table ipv6_tlv_param_table; +/* Preferred TLV ordering for HBH and Dest options (placed by increasing order) +*/ +#define IPEH_TLV_PREF_ORDER_HAO 10 +#define IPEH_TLV_PREF_ORDER_ROUTERALERT 20 +#define IPEH_TLV_PREF_ORDER_JUMBO 30 +#define IPEH_TLV_PREF_ORDER_CALIPSO 40 +int __ipeh_tlv_set (struct tlv_param_table *tlv_param_table,unsigned char type,const struct tlv_params *params,const struct tlv_ops *ops);
include/uapi/linux/ipeh.h +8 -0
@@ -13,4 +13,12 @@ IPEH_TLV_CLASS_FLAG_RTRDSTOPT | \ IPEH_TLV_CLASS_FLAG_DSTOPT) +/* TLV permissions values */ +enum { +IPEH_TLV_PERM_NONE , +IPEH_TLV_PERM_WITH_CHECK , +IPEH_TLV_PERM_NO_CHECK , +IPEH_TLV_PERM_MAX =IPEH_TLV_PERM_NO_CHECK +}; +#endif /* _UAPI_LINUX_IPEH_H */
net/ipv6/exthdrs_common.c +52 -1
93 lines not on this page · raw message
net/ipv6/exthdrs_options.c +45 -0
69 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v8 8/9 ip6tlvs: Add netlink interface
In reply to Tom HerbertFrom: Tom Herbert <[email protected]>
Add a netlink interface to manage the TX TLV parameters. Managed parameters include those for validating and sending TLVs being sent such as alignment, TLV ordering, length limits, etc.
--- include/net/ipeh.h | 16 +++ include/net/ipv6.h | 1 + include/uapi/linux/in6.h | 6 + include/uapi/linux/ipeh.h | 29 +++++ net/ipv6/exthdrs_common.c | 279 +++++++++++++++++++++++++++++++++++++++++++++ net/ipv6/exthdrs_options.c | 81 ++++++++++++- 6 files changed, 410 insertions(+), 2 deletions(-)
include/net/ipeh.h +16 -0
@@ -3,6 +3,7 @@#define _NET_IPEH_H#include <linux/skbuff.h> +#include <net/genetlink.h> /* * Parsing tlv encoded headers.
@@ -106,6 +107,21 @@ static inline int ipeh_tlv_unset_proc(struct tlv_param_table *tlv_param_table,return __ipeh_tlv_unset (tlv_param_table, type, false); } +extern const struct nla_policy ipeh_tlv_nl_policy[]; + +int ipeh_tlv_nl_cmd_set (struct tlv_param_table *tlv_param_table, +struct genl_family *tlv_nl_family, +struct sk_buff *skb,struct genl_info *info); +int ipeh_tlv_nl_cmd_unset (struct tlv_param_table *tlv_param_table, +struct genl_family *tlv_nl_family, +struct sk_buff *skb,struct genl_info *info); +int ipeh_tlv_nl_cmd_get (struct tlv_param_table *tlv_param_table, +struct genl_family *tlv_nl_family, +struct sk_buff *skb,struct genl_info *info); +int ipeh_tlv_nl_dump (struct tlv_param_table *tlv_param_table, +struct genl_family *tlv_nl_family, +struct sk_buff *skb,struct netlink_callback *cb); +/* ipeh_tlv_get_proc_by_type assumes rcu_read_lock is held */ static inline struct tlv_proc *ipeh_tlv_get_proc_by_type (struct tlv_param_table *tlv_param_table,unsigned char type)
include/net/ipv6.h +1 -0
@@ -14,6 +14,7 @@#include <linux/jhash.h> #include <linux/refcount.h> #include <linux/jump_label_ratelimit.h> +#include <net/genetlink.h> #include <net/if_inet6.h> #include <net/ndisc.h> #include <net/flow.h>
include/uapi/linux/in6.h +6 -0
@@ -297,4 +297,10 @@ struct in6_flowlabel_req {* ... * MRT6_MAX */ + +/* NETLINK_GENERIC related info for IPv6 TLVs */ + +#define IPV6_TLV_GENL_NAME "ipv6-tlv" +#define IPV6_TLV_GENL_VERSION 0x1 +#endif /* _UAPI_LINUX_IN6_H */
include/uapi/linux/ipeh.h +29 -0
@@ -21,4 +21,33 @@ enum {IPEH_TLV_PERM_MAX =IPEH_TLV_PERM_NO_CHECK }; +/* NETLINK_GENERIC related info for IP TLVs */ + +enum { +IPEH_TLV_ATTR_UNSPEC , +IPEH_TLV_ATTR_TYPE ,/* u8, > 1 */ +IPEH_TLV_ATTR_ORDER ,/* u16 */ +IPEH_TLV_ATTR_ADMIN_PERM ,/* u8, perm value (0 to 2) */ +IPEH_TLV_ATTR_USER_PERM ,/* u8, perm value (0 to 2) */ +IPEH_TLV_ATTR_CLASS ,/* u8, 3 bit flags */ +IPEH_TLV_ATTR_ALIGN_MULT ,/* u8, 1 to 16 */ +IPEH_TLV_ATTR_ALIGN_OFF ,/* u8, 0 to 15 */ +IPEH_TLV_ATTR_MIN_DATA_LEN ,/* u8 (option data length) */ +IPEH_TLV_ATTR_MAX_DATA_LEN ,/* u8 (option data length) */ +IPEH_TLV_ATTR_DATA_LEN_MULT ,/* u8, 1 to 16 */ +IPEH_TLV_ATTR_DATA_LEN_OFF ,/* u8, 0 to 15 */ + + __IPEH_TLV_ATTR_MAX, +}; + +#define IPEH_TLV_ATTR_MAX (__IPEH_TLV_ATTR_MAX - 1) + +enum { +IPEH_TLV_CMD_SET , +IPEH_TLV_CMD_UNSET , +IPEH_TLV_CMD_GET , + + __IPEH_TLV_CMD_MAX, +}; +#endif /* _UAPI_LINUX_IPEH_H */
net/ipv6/exthdrs_common.c +279 -0
285 lines not on this page · raw message
net/ipv6/exthdrs_options.c +79 -2
98 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v8 9/9 ip6tlvs: Validation of TX Destination and Hop-by-Hop options
In reply to Tom HerbertFrom: Tom Herbert <[email protected]>
Validate Destination and Hop-by-Hop options being set for transmit. This uses the information in the TLV parameters table to validate various aspects of both individual TLVs as well as a list of TLVs in an extension header.
There are two levels of validation that can be performed: simple checks and deep checks. Simple checks validate only the most basic properties such as that the TLV list fits into the EH. Deep checks do a fine grained validation that includes perferred ordering, length limits, and length alignment.
With proper permissions set in the TLV parameter table, this patch allows non-privileged users to send TLVs. Given that TLVs are open ended and potentially a source of DOS attack, deep checks are performed to limit the format that a non-privileged user can send. If deep checks are enabled, a canonical format for sending TLVs is enforced (in adherence with the robustness principle). A TLV must be well ordered with respect to the preferred order for the TLV. Each TLV must be aligned as described in the parameter table. Minimal padding (one padding TLV) is used to align TLVs. The length of the extension header as well as the count of non-padding TLVs is checked against max_*_opts_len and max_*_opts_cnt. For individual TLVs, length limits and length alignment is checked.
--- include/net/ipeh.h | 22 +++ net/ipv6/datagram.c | 51 ++++-- net/ipv6/exthdrs_common.c | 396 ++++++++++++++++++++++++++++++++++++++++++++++ net/ipv6/ipv6_sockglue.c | 39 ++--- 4 files changed, 469 insertions(+), 39 deletions(-)
include/net/ipeh.h +22 -0
@@ -157,6 +157,28 @@ struct ipv6_txoptions *ipeh_renew_options(struct sock *sk,struct ipv6_txoptions *ipeh_fixup_options (struct ipv6_txoptions *opt_space,struct ipv6_txoptions *opt); +int ipeh_opt_validate_tlvs (struct net *net, +struct tlv_param_table *tlv_param_table, +struct ipv6_opt_hdr *opt, +unsigned int optname,bool admin, +unsigned int max_len,unsigned int max_cnt); +int ipeh_opt_validate_single_tlv (struct net *net, +struct tlv_param_table *tlv_param_table, +unsigned int optname,const __u8 *tlv, +size_t len,bool deleting,bool admin); +int ipeh_opt_check_perm (struct net *net, +struct tlv_param_table *tlv_param_table, +struct ipv6_txoptions *txopt,int optname,bool admin); + +struct ipv6_txoptions *ipeh_txopt_from_opt (struct sock *sk, +struct tlv_param_table + *tlv_param_table, +struct ipv6_txoptions *opt, +int optname,char __user *optval, +unsigned int optlen, +unsigned int max_len, +unsigned int max_cnt); +/* Generic extension header TLV parser */ enum ipeh_parse_errors {
net/ipv6/datagram.c +38 -13
96 lines not on this page · raw message
net/ipv6/exthdrs_common.c +396 -0
408 lines not on this page · raw message
net/ipv6/ipv6_sockglue.c +13 -26
@@ -395,40 +395,27 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,case IPV6_RTHDR :case IPV6_DSTOPTS : { +unsigned int max_len =-1U , max_cnt =-1U ;struct ipv6_txoptions *opt; -struct ipv6_opt_hdr *new =NULL ; -/* hop-by-hop / destination options are privileged option */ - retv = -EPERM ; -if (optname !=IPV6_RTHDR && !ns_capable (net->user_ns,CAP_NET_RAW )) +switch (optname) { +case IPV6_HOPOPTS : + max_len = net->ipv6.sysctl.max_hbh_opts_len; + max_cnt = net->ipv6.sysctl.max_hbh_opts_cnt;break ; - -/* remove any sticky options header with a zero option -* length, per RFC3542. -*/ -if (optlen ==0 ) - optval =NULL ; -else if (!optval) - goto e_inval; -else if (optlen <sizeof (struct ipv6_opt_hdr ) || - optlen &0x7 || optlen >8 *255 ) - goto e_inval; -else { - new =memdup_user (optval, optlen); -if (IS_ERR (new)) { - retv =PTR_ERR (new); +case IPV6_RTHDRDSTOPTS : +case IPV6_DSTOPTS : + max_len = net->ipv6.sysctl.max_dst_opts_len; + max_cnt = net->ipv6.sysctl.max_dst_opts_cnt;break ; - } -if (unlikely (ipv6_optlen (new) > optlen)) { -kfree (new); - goto e_inval; - } } opt =rcu_dereference_protected (np->opt,lockdep_sock_is_held (sk)); - opt =ipeh_renew_options (sk, opt, optname, new); -kfree (new); + opt =ipeh_txopt_from_opt (sk, &ipv6_tlv_param_table, opt, + optname, optval, optlen, max_len, + max_cnt); +if (IS_ERR (opt)) { retv =PTR_ERR (opt);break ;
Signature · 1 line
2.7.4
David Miller
maintainerFrom: Tom Herbert <[email protected]>
Date: Thu, 26 Dec 2019 14:51:29 -0800
Quoted 3 lines
The fundamental rationale here is to make various TLVs, in particular Hop-by-Hop and Destination options, usable, robust, scalable, and extensible to support emerging functionality.
So, patch #1 is fine and it seems to structure the code to more easily enable support for:
https://tools.ietf.org/html/draft-ietf-6man-icmp-limits-07
(I'll note in passing how frustrating it is that, based upon your handling of things in that past, I know that I have to go out and explicitly look for draft RFCs containing your name in order to figure out what your overall long term agenda actually is. You should be stating these kinds of things in your commit messages)
But as for the rest of the patch series, what are these "emerging functionalities" you are talking about?
I've heard some noises about people wanting to do some kind of "kerberos for packets". Or even just plain putting app + user ID information into options.
Is that where this is going? I have no idea, because you won't say.
And honestly, this stuff sounds so easy to misuse by governments and other entities. It could also be used to allow ISPs to limit users
in very undesirable and unfair ways. And honestly, surveilance and
limiting are the most likely uses for such a facility. I can't see it legitimately being promoted as a "security" feature, really.
I think the whole TX socket option can wait.
And because of that the whole consolidation and cleanup of the option handling code is untenable, because without a use case all it does is make -stable backports insanely painful.
Quoted 19 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Thu, 26 Dec 2019 14:51:29 -0800Quoted 3 lines
The fundamental rationale here is to make various TLVs, in particular Hop-by-Hop and Destination options, usable, robust, scalable, and extensible to support emerging functionality.
So, patch #1 is fine and it seems to structure the code to more easily enable support for:
https://tools.ietf.org/html/draft-ietf-6man-icmp-limits-07
(I'll note in passing how frustrating it is that, based upon your handling of things in that past, I know that I have to go out and explicitly look for draft RFCs containing your name in order to figure out what your overall long term agenda actually is. You should be stating these kinds of things in your commit messages)
Quoted 9 lines
But as for the rest of the patch series, what are these "emerging functionalities" you are talking about?
I've heard some noises about people wanting to do some kind of "kerberos for packets". Or even just plain putting app + user ID information into options.
Is that where this is going? I have no idea, because you won't say.
Yes, there is some of that. Here are some of the use cases for HBH options:
PMTU option: draft-ietf-6man-mtu-option-01. There is a P4 implementation as well as Linux PoC for this that was demonstated @IETF103 hackathon.
IOAM option: https://tools.ietf.org/html/draft-ietf-ippm-ioam-ipv6-options-00.
There is also P4 implementation and Linux router support demonstrated at IETF104 hackathon. INT is a related technology that would also use this.
FAST option: https://datatracker.ietf.org/doc/draft-herbert-fast/. I have PoC for this. There are some other protocol proposals in the is are (I know Huawei has something to describe the QoS that should be applied).
There are others including the whole space especially as a real solution for host to networking signaling gets fleshed out. There's also the whole world of segment routing options and where that's going.
Quoted 6 lines
And honestly, this stuff sounds so easy to misuse by governments and other entities. It could also be used to allow ISPs to limit users
in very undesirable and unfair ways. And honestly, surveilance and
limiting are the most likely uses for such a facility. I can't see it legitimately being promoted as a "security" feature, really.
Yes, but the problem isn't unique to IPv6 options nor would abuse be prevented by not implementing them in Linux. Router vendors will happily provide the necessary support to allow abuse :-) AH is the prescribed way to prevent this sort of abuse (aside from encrypting everything that isn't necessary to route packets, but that's another story). AH is fully supported by Linux, good luck finding a router vendor that cares about it :-)
Quoted 5 lines
I think the whole TX socket option can wait.
And because of that the whole consolidation and cleanup of the option handling code is untenable, because without a use case all it does is make -stable backports insanely painful.
The problem with "wait and see" approach is that Linux is not the only game in town. There are other players that are pursuing this area (Cisco and Huawei in particular). They are able to implement protocols more to appease their short term marketing requirements with little regard for what is best for the community. This is why Linux is so critical to networking, it is the only open forum where real scrutiny is applied to how protocols are implemented. If the alternatives are given free to lead then it's very likely we'll end up being stuck with what they do and probably have to follow their lead regardless of how miserable they make the protocols. We've already seen this in segment routing, their attempts to kill IP fragmentation, and all the other examples of protocol ossification that unnecessarily restrict what hosts are allowed to send in the network and hence reduce the utility and security we are able to offer the user.
The other data point I will offer is that the current Linux implementation of IPv6 destination and hop-by-hop options in the kernel is next to useless. Nobody is using the ones that have been implemented, and adding support for a new is a major pain-- the ability for modules to register support for an option seems like an obvious feature to me. Similarly, the restriction that only admin can set options is overly restrictive-- allowing to non-privileged users to send options under tightly controlled constraints set by the admin also seems reasonable to me.
Tom
Tom,
Happy new year!!
I believe that these patches cost you great effort. However, we would like to see the 6-10 subsequent patch set to be really able to understand where are you going with these ones.
At some point you mentioned that router vendors make protocol in miserable way. Do you believe the right way is that every individual defines the protocol the way he wants in a single authored IETF draft ?
Regarding 10) Support IPv4 extension headers.
I see that your drafts describing the idea are expired [1][2].
Do you plan to add to the kernel the implementation of expired contents ? or did you abandoned these drafts and described the idea somewhere else that I’m not aware of ?
[1] https://tools.ietf.org/html/draft-herbert-ipv4-udpencap-eh-01
[2] https://tools.ietf.org/html/draft-herbert-ipv4-eh-01
Ahmed
Quoted 94 lines · On Thu, 2 Jan 2020 16:42:24 -0800 Tom Herbert <[email protected]> wrote:
Quoted 19 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Thu, 26 Dec 2019 14:51:29 -0800Quoted 3 lines
The fundamental rationale here is to make various TLVs, in particular Hop-by-Hop and Destination options, usable, robust, scalable, and extensible to support emerging functionality.
So, patch #1 is fine and it seems to structure the code to more easily enable support for:
https://tools.ietf.org/html/draft-ietf-6man-icmp-limits-07
(I'll note in passing how frustrating it is that, based upon your handling of things in that past, I know that I have to go out and explicitly look for draft RFCs containing your name in order to figure out what your overall long term agenda actually is. You should be stating these kinds of things in your commit messages)
Quoted 9 lines
But as for the rest of the patch series, what are these "emerging functionalities" you are talking about?
I've heard some noises about people wanting to do some kind of "kerberos for packets". Or even just plain putting app + user ID information into options.
Is that where this is going? I have no idea, because you won't say.
Yes, there is some of that. Here are some of the use cases for HBH options:
PMTU option: draft-ietf-6man-mtu-option-01. There is a P4 implementation as well as Linux PoC for this that was demonstated @IETF103 hackathon.
IOAM option: https://tools.ietf.org/html/draft-ietf-ippm-ioam-ipv6-options-00.
There is also P4 implementation and Linux router support demonstrated at IETF104 hackathon. INT is a related technology that would also use this.
FAST option: https://datatracker.ietf.org/doc/draft-herbert-fast/. I have PoC for this. There are some other protocol proposals in the is are (I know Huawei has something to describe the QoS that should be applied).There are others including the whole space especially as a real solution for host to networking signaling gets fleshed out. There's also the whole world of segment routing options and where that's going.
Quoted 6 lines
And honestly, this stuff sounds so easy to misuse by governments and other entities. It could also be used to allow ISPs to limit users
in very undesirable and unfair ways. And honestly, surveilance and
limiting are the most likely uses for such a facility. I can't see it legitimately being promoted as a "security" feature, really.Yes, but the problem isn't unique to IPv6 options nor would abuse be prevented by not implementing them in Linux. Router vendors will happily provide the necessary support to allow abuse :-) AH is the prescribed way to prevent this sort of abuse (aside from encrypting everything that isn't necessary to route packets, but that's another story). AH is fully supported by Linux, good luck finding a router vendor that cares about it :-)
Quoted 5 lines
I think the whole TX socket option can wait.
And because of that the whole consolidation and cleanup of the option handling code is untenable, because without a use case all it does is make -stable backports insanely painful.
The problem with "wait and see" approach is that Linux is not the only game in town. There are other players that are pursuing this area (Cisco and Huawei in particular). They are able to implement protocols more to appease their short term marketing requirements with little regard for what is best for the community. This is why Linux is so critical to networking, it is the only open forum where real scrutiny is applied to how protocols are implemented. If the alternatives are given free to lead then it's very likely we'll end up being stuck with what they do and probably have to follow their lead regardless of how miserable they make the protocols. We've already seen this in segment routing, their attempts to kill IP fragmentation, and all the other examples of protocol ossification that unnecessarily restrict what hosts are allowed to send in the network and hence reduce the utility and security we are able to offer the user.
The other data point I will offer is that the current Linux implementation of IPv6 destination and hop-by-hop options in the kernel is next to useless. Nobody is using the ones that have been implemented, and adding support for a new is a major pain-- the ability for modules to register support for an option seems like an obvious feature to me. Similarly, the restriction that only admin can set options is overly restrictive-- allowing to non-privileged users to send options under tightly controlled constraints set by the admin also seems reasonable to me.
Tom
Signature · 1 line
kernel Dev <[email protected]>
Quoted 4 lines · kernel Dev
Tom,
Happy new year!!
Happy new year to you!
Quoted 2 lines
I believe that these patches cost you great effort. However, we would like to see the 6-10 subsequent patch set to be really able to understand where are you going with these ones.
I can post those as RFC.
Quoted 2 lines
At some point you mentioned that router vendors make protocol in miserable way. Do you believe the right way is that every individual defines the protocol the way he wants in a single authored IETF draft ?
No, that defies the whole purpose of standard and interoperable protocols. The problem we are finding with IETF is that it has no means to enforce conformance of the protocols it standardizes. Router vendors openly exploit this, for instance at the last IETF the Cisco engineer presenting extension header insertion (a clear violation of RFC8200) plainly said upfront that regardless of any feedback or input they will continue developing and deploying it the way they want. Note this is not an indictment of all router vendors and their engineers, there are many that are trying to do the right thing-- but it's really pretty easy for a few engineers at large vendors to cheat the system in different ways. The only pushback IETF can do is to not standardize these non-conformant quasi-proprietary protocols. The real way to combat this provide open implementation that demonstrates the correct use of the protocols and show that's more extensible and secure than these "hacks".
Quoted 7 lines
Regarding 10) Support IPv4 extension headers.
I see that your drafts describing the idea are expired [1][2].
Do you plan to add to the kernel the implementation of expired contents ? or did you abandoned these drafts and described the idea somewhere else that I’m not aware of ?[1] https://tools.ietf.org/html/draft-herbert-ipv4-udpencap-eh-01
[2] https://tools.ietf.org/html/draft-herbert-ipv4-eh-01
[1] is obsoleted by [2]. I will update [2] shortly. I may also propose an IETF hackathon project to bring up IOAM over IPv4 if you are interested.
Tom
Quoted 104 lines
Ahmed
Quoted 93 lines · On Thu, 2 Jan 2020 16:42:24 -0800 Tom Herbert <[email protected]> wrote:
Quoted 19 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Thu, 26 Dec 2019 14:51:29 -0800Quoted 3 lines
The fundamental rationale here is to make various TLVs, in particular Hop-by-Hop and Destination options, usable, robust, scalable, and extensible to support emerging functionality.
So, patch #1 is fine and it seems to structure the code to more easily enable support for:
https://tools.ietf.org/html/draft-ietf-6man-icmp-limits-07
(I'll note in passing how frustrating it is that, based upon your handling of things in that past, I know that I have to go out and explicitly look for draft RFCs containing your name in order to figure out what your overall long term agenda actually is. You should be stating these kinds of things in your commit messages)
Quoted 9 lines
But as for the rest of the patch series, what are these "emerging functionalities" you are talking about?
I've heard some noises about people wanting to do some kind of "kerberos for packets". Or even just plain putting app + user ID information into options.
Is that where this is going? I have no idea, because you won't say.
Yes, there is some of that. Here are some of the use cases for HBH options:
PMTU option: draft-ietf-6man-mtu-option-01. There is a P4 implementation as well as Linux PoC for this that was demonstated @IETF103 hackathon.
IOAM option: https://tools.ietf.org/html/draft-ietf-ippm-ioam-ipv6-options-00.
There is also P4 implementation and Linux router support demonstrated at IETF104 hackathon. INT is a related technology that would also use this.
FAST option: https://datatracker.ietf.org/doc/draft-herbert-fast/. I have PoC for this. There are some other protocol proposals in the is are (I know Huawei has something to describe the QoS that should be applied).There are others including the whole space especially as a real solution for host to networking signaling gets fleshed out. There's also the whole world of segment routing options and where that's going.
Quoted 6 lines
And honestly, this stuff sounds so easy to misuse by governments and other entities. It could also be used to allow ISPs to limit users
in very undesirable and unfair ways. And honestly, surveilance and
limiting are the most likely uses for such a facility. I can't see it legitimately being promoted as a "security" feature, really.Yes, but the problem isn't unique to IPv6 options nor would abuse be prevented by not implementing them in Linux. Router vendors will happily provide the necessary support to allow abuse :-) AH is the prescribed way to prevent this sort of abuse (aside from encrypting everything that isn't necessary to route packets, but that's another story). AH is fully supported by Linux, good luck finding a router vendor that cares about it :-)
Quoted 5 lines
I think the whole TX socket option can wait.
And because of that the whole consolidation and cleanup of the option handling code is untenable, because without a use case all it does is make -stable backports insanely painful.
The problem with "wait and see" approach is that Linux is not the only game in town. There are other players that are pursuing this area (Cisco and Huawei in particular). They are able to implement protocols more to appease their short term marketing requirements with little regard for what is best for the community. This is why Linux is so critical to networking, it is the only open forum where real scrutiny is applied to how protocols are implemented. If the alternatives are given free to lead then it's very likely we'll end up being stuck with what they do and probably have to follow their lead regardless of how miserable they make the protocols. We've already seen this in segment routing, their attempts to kill IP fragmentation, and all the other examples of protocol ossification that unnecessarily restrict what hosts are allowed to send in the network and hence reduce the utility and security we are able to offer the user.
The other data point I will offer is that the current Linux implementation of IPv6 destination and hop-by-hop options in the kernel is next to useless. Nobody is using the ones that have been implemented, and adding support for a new is a major pain-- the ability for modules to register support for an option seems like an obvious feature to me. Similarly, the restriction that only admin can set options is overly restrictive-- allowing to non-privileged users to send options under tightly controlled constraints set by the admin also seems reasonable to me.
Quoted 1 line
Tom
--
kernel Dev <[email protected]>
David Miller
maintainerFrom: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 09:35:08 -0800
Quoted 3 lines
The real way to combat this provide open implementation that demonstrates the correct use of the protocols and show that's more extensible and secure than these "hacks".
Keep dreaming, this won't stop Cisco from doing whatever it wants to do.
Quoted 9 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 09:35:08 -0800Quoted 3 lines
The real way to combat this provide open implementation that demonstrates the correct use of the protocols and show that's more extensible and secure than these "hacks".
Keep dreaming, this won't stop Cisco from doing whatever it wants to do.
See QUIC. See TLS. See TCP fast open. See transport layer encryption. These are prime examples where we've steered the Internet from host protocols and implementation to successfully obsolete or at least work around protocol ossification that was perpetuated by router vendors. Cisco is not the Internet!
David Miller
maintainerFrom: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 14:31:58 -0800
Quoted 9 lines · David Miller
Quoted 8 lines
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 09:35:08 -0800Quoted 3 lines
The real way to combat this provide open implementation that demonstrates the correct use of the protocols and show that's more extensible and secure than these "hacks".
Quoted 7 lines
Quoted 1 line
Keep dreaming, this won't stop Cisco from doing whatever it wants to do.
See QUIC. See TLS. See TCP fast open. See transport layer encryption. These are prime examples where we've steered the Internet from host protocols and implementation to successfully obsolete or at least work around protocol ossification that was perpetuated by router vendors. Cisco is not the Internet!
Seriously, I wish you luck stopping the SRv6 header insertion stuff.
It's simply not happening, no matter what transport layer technology you throw at the situation.
Quoted 15 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 14:31:58 -0800Quoted 11 lines · David Miller
Quoted 9 lines
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 09:35:08 -0800Quoted 3 lines
The real way to combat this provide open implementation that demonstrates the correct use of the protocols and show that's more extensible and secure than these "hacks".
Keep dreaming, this won't stop Cisco from doing whatever it wants to do.
Quoted 8 lines
Quoted 5 lines
See QUIC. See TLS. See TCP fast open. See transport layer encryption. These are prime examples where we've steered the Internet from host protocols and implementation to successfully obsolete or at least work around protocol ossification that was perpetuated by router vendors. Cisco is not the Internet!
Seriously, I wish you luck stopping the SRv6 header insertion stuff.
Dave,
I agree we can't stop it, but maybe we can steer it to be at least palatable. There are valid use cases for extension header insertion. Ironically, SRv6 header insertion isn't one of them; the proponents have failed to offer even a single reason why the alternative of IPv6 encapsulation isn't sufficient (believe me, we've asked _many_ times for some justification and only get hand waving!). There are, however, some interesting uses cases like in IOAM where the operator would like to annotate packets as they traverse the network. Encapsulation is insufficient if they don't know what the end point would be or they don't want the annotation to change the path the packets take (versus those that aren't annotated).
The salient problem with extension header insertion is lost of attribution. It is fundamental in the IP protocol that the contents of a packet are attributed to the source host identified by the source address. If some intermediate node inserts an extension header that subsequently breaks the packet downstream then there is no obvious way to debug this. If an ICMP message is sent because of the receiving data, then receiving host can't do much with it; it's not the source of the data in error and nothing in the packet tells who the culprit is. The Cisco guys have at least conceded one point on SRv6 insertion due to pushback on this, their latest draft only does SRv6 insertion on packets that have already been encapsulated in IPIP on ingress into the domain. This is intended to at least restrict the modified packets to a controlled domain (I'm note sure if any implementations enforce this though). My proposal is to require an "attribution" HBH option that would clearly identify inserted data put in a packet by middleboxes (draft-herbert-6man-eh-attrib-00). This is a tradeoff to allow extension header insertion, but require protocol to give attribution and make it at least somewhat robust and manageable.
Tom
Quoted 39 lines · Tom Herbert
Quoted 15 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 14:31:58 -0800Quoted 11 lines · David Miller
Quoted 9 lines
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 09:35:08 -0800Quoted 3 lines
The real way to combat this provide open implementation that demonstrates the correct use of the protocols and show that's more extensible and secure than these "hacks".
Keep dreaming, this won't stop Cisco from doing whatever it wants to do.
Quoted 8 lines
Quoted 5 lines
See QUIC. See TLS. See TCP fast open. See transport layer encryption. These are prime examples where we've steered the Internet from host protocols and implementation to successfully obsolete or at least work around protocol ossification that was perpetuated by router vendors. Cisco is not the Internet!
Seriously, I wish you luck stopping the SRv6 header insertion stuff.
Dave,
I agree we can't stop it, but maybe we can steer it to be at least palatable. There are valid use cases for extension header insertion. Ironically, SRv6 header insertion isn't one of them; the proponents have failed to offer even a single reason why the alternative of IPv6 encapsulation isn't sufficient (believe me, we've asked _many_ times for some justification and only get hand waving!). There are, however, some interesting uses cases like in IOAM where the operator would like to annotate packets as they traverse the network. Encapsulation is insufficient if they don't know what the end point would be or they don't want the annotation to change the path the packets take (versus those that aren't annotated).
Quoted 1 line
The salient problem with extension header insertion is lost of
And the problems that can be introduced by changing the effective path MTU...
Quoted 18 lines
attribution. It is fundamental in the IP protocol that the contents of a packet are attributed to the source host identified by the source address. If some intermediate node inserts an extension header that subsequently breaks the packet downstream then there is no obvious way to debug this. If an ICMP message is sent because of the receiving data, then receiving host can't do much with it; it's not the source of the data in error and nothing in the packet tells who the culprit is. The Cisco guys have at least conceded one point on SRv6 insertion due to pushback on this, their latest draft only does SRv6 insertion on packets that have already been encapsulated in IPIP on ingress into the domain. This is intended to at least restrict the modified packets to a controlled domain (I'm note sure if any implementations enforce this though). My proposal is to require an "attribution" HBH option that would clearly identify inserted data put in a packet by middleboxes (draft-herbert-6man-eh-attrib-00). This is a tradeoff to allow extension header insertion, but require protocol to give attribution and make it at least somewhat robust and manageable.
Quoted 1 line
Tom
FWIW the SRv6 header insertion stuff is still under discussion in spring wg (last I knew). I proposed one option that could be used to avoid insertion (allow for extra scratch space
https://mailarchive.ietf.org/arch/msg/spring/UhThRTNxbHWNiMGgRi3U0SqLaDA),
but nothing has been conclusively resolved last I checked.
As everyone probably knows, the draft-ietf-* documents are working-group-adopted documents (though final publication is never guaranteed). My current reading of 6man tea leaves is that neither "ICMP limits" and "MTU option" docs were terribly contentious. Whether code reorg is important for implementing these I'm not competent enough to say.
Quoted 41 lines · Erik Kline
Quoted 39 lines · Tom Herbert
Quoted 15 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 14:31:58 -0800Quoted 11 lines · David Miller
Quoted 9 lines
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 09:35:08 -0800Quoted 3 lines
The real way to combat this provide open implementation that demonstrates the correct use of the protocols and show that's more extensible and secure than these "hacks".
Keep dreaming, this won't stop Cisco from doing whatever it wants to do.
Quoted 8 lines
Quoted 5 lines
See QUIC. See TLS. See TCP fast open. See transport layer encryption. These are prime examples where we've steered the Internet from host protocols and implementation to successfully obsolete or at least work around protocol ossification that was perpetuated by router vendors. Cisco is not the Internet!
Seriously, I wish you luck stopping the SRv6 header insertion stuff.
Dave,
I agree we can't stop it, but maybe we can steer it to be at least palatable. There are valid use cases for extension header insertion. Ironically, SRv6 header insertion isn't one of them; the proponents have failed to offer even a single reason why the alternative of IPv6 encapsulation isn't sufficient (believe me, we've asked _many_ times for some justification and only get hand waving!). There are, however, some interesting uses cases like in IOAM where the operator would like to annotate packets as they traverse the network. Encapsulation is insufficient if they don't know what the end point would be or they don't want the annotation to change the path the packets take (versus those that aren't annotated).
Quoted 4 lines
Quoted 1 line
The salient problem with extension header insertion is lost of
And the problems that can be introduced by changing the effective path MTU...
Eric,
Yep, increasing the size of packet in transit potentially wreaks havoc on PMTU discovery, however I personally think that the issue might be overblown. We already have the same problem when tunneling is done in the network since most tunneling implementations and deployments just assume the operator has set large enough MTUs. As long as all the overhead inserted into the packet doesn't reduce the end host PMTU below 1280, PMTU discovery and probably even PTB for a packet with inserted headers still has right effect.
Quoted 18 lines
Quoted 18 lines
attribution. It is fundamental in the IP protocol that the contents of a packet are attributed to the source host identified by the source address. If some intermediate node inserts an extension header that subsequently breaks the packet downstream then there is no obvious way to debug this. If an ICMP message is sent because of the receiving data, then receiving host can't do much with it; it's not the source of the data in error and nothing in the packet tells who the culprit is. The Cisco guys have at least conceded one point on SRv6 insertion due to pushback on this, their latest draft only does SRv6 insertion on packets that have already been encapsulated in IPIP on ingress into the domain. This is intended to at least restrict the modified packets to a controlled domain (I'm note sure if any implementations enforce this though). My proposal is to require an "attribution" HBH option that would clearly identify inserted data put in a packet by middleboxes (draft-herbert-6man-eh-attrib-00). This is a tradeoff to allow extension header insertion, but require protocol to give attribution and make it at least somewhat robust and manageable.
Quoted 4 lines
Quoted 1 line
Tom
FWIW the SRv6 header insertion stuff is still under discussion in spring wg (last I knew). I proposed one option that could be used to
It's also under discussion in 6man.
Quoted 4 lines
avoid insertion (allow for extra scratch space
https://mailarchive.ietf.org/arch/msg/spring/UhThRTNxbHWNiMGgRi3U0SqLaDA),
but nothing has been conclusively resolved last I checked.
I saw your proposal. It's a good idea from POV to be conformant with RFC8200 and avoid the PMTU problems, but the header insertion proponents aren't going to like it at all. First, it means that the source is in control of the insertion policy and host is required to change-- no way they'll buy into that ;-). Secondly, if the scratch space isn't used they'll undoubtedly claim that is unnecessary overhead.
Tom
Quoted 6 lines
As everyone probably knows, the draft-ietf-* documents are working-group-adopted documents (though final publication is never guaranteed). My current reading of 6man tea leaves is that neither "ICMP limits" and "MTU option" docs were terribly contentious. Whether code reorg is important for implementing these I'm not competent enough to say.
Tom,
I will not go into whether Tom or router vendors is right from IETF perspective as here is not the place to discuss.
But it seems to me that the motivation behind these patches is just to pushback on the current IETF proposals.
The patches timeline is completely aligned with when IETF threads get into tough discussions (May 2019, August 2019, and now).
I’m not the one to decide, but IMO people should not add stuff to the kernel just to enforce their opinions on other mailers.
Quoted 103 lines · On Fri, 3 Jan 2020 16:37:33 -0800 Tom Herbert <[email protected]> wrote:
Quoted 41 lines · Erik Kline
Quoted 39 lines · Tom Herbert
Quoted 15 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 14:31:58 -0800Quoted 11 lines · David Miller
Quoted 9 lines
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 09:35:08 -0800Quoted 3 lines
The real way to combat this provide open implementation that demonstrates the correct use of the protocols and show that's more extensible and secure than these "hacks".
Keep dreaming, this won't stop Cisco from doing whatever it wants to do.
Quoted 8 lines
Quoted 5 lines
See QUIC. See TLS. See TCP fast open. See transport layer encryption. These are prime examples where we've steered the Internet from host protocols and implementation to successfully obsolete or at least work around protocol ossification that was perpetuated by router vendors. Cisco is not the Internet!
Seriously, I wish you luck stopping the SRv6 header insertion stuff.
Dave,
I agree we can't stop it, but maybe we can steer it to be at least palatable. There are valid use cases for extension header insertion. Ironically, SRv6 header insertion isn't one of them; the proponents have failed to offer even a single reason why the alternative of IPv6 encapsulation isn't sufficient (believe me, we've asked _many_ times for some justification and only get hand waving!). There are, however, some interesting uses cases like in IOAM where the operator would like to annotate packets as they traverse the network. Encapsulation is insufficient if they don't know what the end point would be or they don't want the annotation to change the path the packets take (versus those that aren't annotated).
Quoted 4 lines
Quoted 1 line
The salient problem with extension header insertion is lost of
And the problems that can be introduced by changing the effective path MTU...
Eric,
Yep, increasing the size of packet in transit potentially wreaks havoc on PMTU discovery, however I personally think that the issue might be overblown. We already have the same problem when tunneling is done in the network since most tunneling implementations and deployments just assume the operator has set large enough MTUs. As long as all the overhead inserted into the packet doesn't reduce the end host PMTU below 1280, PMTU discovery and probably even PTB for a packet with inserted headers still has right effect.
Quoted 18 lines
Quoted 18 lines
attribution. It is fundamental in the IP protocol that the contents of a packet are attributed to the source host identified by the source address. If some intermediate node inserts an extension header that subsequently breaks the packet downstream then there is no obvious way to debug this. If an ICMP message is sent because of the receiving data, then receiving host can't do much with it; it's not the source of the data in error and nothing in the packet tells who the culprit is. The Cisco guys have at least conceded one point on SRv6 insertion due to pushback on this, their latest draft only does SRv6 insertion on packets that have already been encapsulated in IPIP on ingress into the domain. This is intended to at least restrict the modified packets to a controlled domain (I'm note sure if any implementations enforce this though). My proposal is to require an "attribution" HBH option that would clearly identify inserted data put in a packet by middleboxes (draft-herbert-6man-eh-attrib-00). This is a tradeoff to allow extension header insertion, but require protocol to give attribution and make it at least somewhat robust and manageable.
Quoted 4 lines
Quoted 1 line
Tom
FWIW the SRv6 header insertion stuff is still under discussion in spring wg (last I knew). I proposed one option that could be used to
It's also under discussion in 6man.
Quoted 4 lines
avoid insertion (allow for extra scratch space
https://mailarchive.ietf.org/arch/msg/spring/UhThRTNxbHWNiMGgRi3U0SqLaDA),
but nothing has been conclusively resolved last I checked.I saw your proposal. It's a good idea from POV to be conformant with RFC8200 and avoid the PMTU problems, but the header insertion proponents aren't going to like it at all. First, it means that the source is in control of the insertion policy and host is required to change-- no way they'll buy into that ;-). Secondly, if the scratch space isn't used they'll undoubtedly claim that is unnecessary overhead.
Tom
Quoted 6 lines
As everyone probably knows, the draft-ietf-* documents are working-group-adopted documents (though final publication is never guaranteed). My current reading of 6man tea leaves is that neither "ICMP limits" and "MTU option" docs were terribly contentious. Whether code reorg is important for implementing these I'm not competent enough to say.
Quoted 7 lines · kernel Dev
Tom,
I will not go into whether Tom or router vendors is right from IETF perspective as here is not the place to discuss.
But it seems to me that the motivation behind these patches is just to pushback on the current IETF proposals.
Sorry, but that is completely untrue. The patches are a general improvement. The ability to allow modules to register handlers for options code points has nothing to do with "pushback on the current IETF protocols". This sort of registration is a mechanism used all over the place. Similarly, allowing non-priveledged users to send options is not for any specific protocol-- it is a *general* mechanism.
Quoted 2 lines
The patches timeline is completely aligned with when IETF threads get into tough discussions (May 2019, August 2019, and now).
Yes, discussion about new protocols in IETF tends to correlate with development and implementation of the protocols. That shouldn't surprise anyone. SRv6 for instance was highly controversial in IETF and yet the patches went in.
Quoted 1 line
I’m not the one to decide, but IMO people should not add stuff to the kernel just to enforce their opinions on other mailers.
I take exception with your insinuation. Seeing as how you might be new to Linux kernel development I will ignore it. But, in the future, I strongly suggest you be careful about accusing people about their motivations based solely on one interaction.
Tom
Quoted 111 lines
Quoted 95 lines · On Fri, 3 Jan 2020 16:37:33 -0800 Tom Herbert <[email protected]> wrote:
Quoted 41 lines · Erik Kline
Quoted 39 lines · Tom Herbert
Quoted 15 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 14:31:58 -0800Quoted 11 lines · David Miller
Quoted 9 lines
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 09:35:08 -0800Quoted 3 lines
The real way to combat this provide open implementation that demonstrates the correct use of the protocols and show that's more extensible and secure than these "hacks".
Keep dreaming, this won't stop Cisco from doing whatever it wants to do.
Quoted 8 lines
Quoted 5 lines
See QUIC. See TLS. See TCP fast open. See transport layer encryption. These are prime examples where we've steered the Internet from host protocols and implementation to successfully obsolete or at least work around protocol ossification that was perpetuated by router vendors. Cisco is not the Internet!
Seriously, I wish you luck stopping the SRv6 header insertion stuff.
Dave,
I agree we can't stop it, but maybe we can steer it to be at least palatable. There are valid use cases for extension header insertion. Ironically, SRv6 header insertion isn't one of them; the proponents have failed to offer even a single reason why the alternative of IPv6 encapsulation isn't sufficient (believe me, we've asked _many_ times for some justification and only get hand waving!). There are, however, some interesting uses cases like in IOAM where the operator would like to annotate packets as they traverse the network. Encapsulation is insufficient if they don't know what the end point would be or they don't want the annotation to change the path the packets take (versus those that aren't annotated).
Quoted 4 lines
Quoted 1 line
The salient problem with extension header insertion is lost of
And the problems that can be introduced by changing the effective path MTU...
Eric,
Yep, increasing the size of packet in transit potentially wreaks havoc on PMTU discovery, however I personally think that the issue might be overblown. We already have the same problem when tunneling is done in the network since most tunneling implementations and deployments just assume the operator has set large enough MTUs. As long as all the overhead inserted into the packet doesn't reduce the end host PMTU below 1280, PMTU discovery and probably even PTB for a packet with inserted headers still has right effect.
Quoted 18 lines
Quoted 18 lines
attribution. It is fundamental in the IP protocol that the contents of a packet are attributed to the source host identified by the source address. If some intermediate node inserts an extension header that subsequently breaks the packet downstream then there is no obvious way to debug this. If an ICMP message is sent because of the receiving data, then receiving host can't do much with it; it's not the source of the data in error and nothing in the packet tells who the culprit is. The Cisco guys have at least conceded one point on SRv6 insertion due to pushback on this, their latest draft only does SRv6 insertion on packets that have already been encapsulated in IPIP on ingress into the domain. This is intended to at least restrict the modified packets to a controlled domain (I'm note sure if any implementations enforce this though). My proposal is to require an "attribution" HBH option that would clearly identify inserted data put in a packet by middleboxes (draft-herbert-6man-eh-attrib-00). This is a tradeoff to allow extension header insertion, but require protocol to give attribution and make it at least somewhat robust and manageable.
Quoted 4 lines
Quoted 1 line
Tom
FWIW the SRv6 header insertion stuff is still under discussion in spring wg (last I knew). I proposed one option that could be used to
It's also under discussion in 6man.
Quoted 4 lines
avoid insertion (allow for extra scratch space
https://mailarchive.ietf.org/arch/msg/spring/UhThRTNxbHWNiMGgRi3U0SqLaDA),
but nothing has been conclusively resolved last I checked.I saw your proposal. It's a good idea from POV to be conformant with RFC8200 and avoid the PMTU problems, but the header insertion proponents aren't going to like it at all. First, it means that the source is in control of the insertion policy and host is required to change-- no way they'll buy into that ;-). Secondly, if the scratch space isn't used they'll undoubtedly claim that is unnecessary overhead.
Quoted 8 lines
Tom
Quoted 6 lines
As everyone probably knows, the draft-ietf-* documents are working-group-adopted documents (though final publication is never guaranteed). My current reading of 6man tea leaves is that neither "ICMP limits" and "MTU option" docs were terribly contentious. Whether code reorg is important for implementing these I'm not competent enough to say.
--
Hi Tom,
I wasn’t accusing anyone in my message. It is a personal opinion. If my message was misunderstood, then please accept my apologies.
Also SRv6 is not highly controversial and this is proven by its adoption rate and ecosystem.
I have never seen a highly controversial technology that has (in two years) at least 8 public deployments and is supported by 18 publicly known routing platforms from 8 different vendors. Also has support in the mainline of Linux kernel, FD.io VPP, Wireshark, tcpdump, iptables and nftables.
If you are a network operator, would you deply a highly controversial technology in your network ?
Quoted 144 lines · On Sat, 4 Jan 2020 09:45:59 -0800 Tom Herbert <[email protected]> wrote:
Quoted 7 lines · kernel Dev
Tom,
I will not go into whether Tom or router vendors is right from IETF perspective as here is not the place to discuss.
But it seems to me that the motivation behind these patches is just to pushback on the current IETF proposals.
Sorry, but that is completely untrue. The patches are a general improvement. The ability to allow modules to register handlers for options code points has nothing to do with "pushback on the current IETF protocols". This sort of registration is a mechanism used all over the place. Similarly, allowing non-priveledged users to send options is not for any specific protocol-- it is a *general* mechanism.
Quoted 2 lines
The patches timeline is completely aligned with when IETF threads get into tough discussions (May 2019, August 2019, and now).
Yes, discussion about new protocols in IETF tends to correlate with development and implementation of the protocols. That shouldn't surprise anyone. SRv6 for instance was highly controversial in IETF and yet the patches went in.
Quoted 1 line
I’m not the one to decide, but IMO people should not add stuff to the kernel just to enforce their opinions on other mailers.
I take exception with your insinuation. Seeing as how you might be new to Linux kernel development I will ignore it. But, in the future, I strongly suggest you be careful about accusing people about their motivations based solely on one interaction.
Tom
Quoted 111 lines
Quoted 95 lines · On Fri, 3 Jan 2020 16:37:33 -0800 Tom Herbert <[email protected]> wrote:
Quoted 41 lines · Erik Kline
Quoted 39 lines · Tom Herbert
Quoted 15 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 14:31:58 -0800Quoted 11 lines · David Miller
Quoted 9 lines
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 09:35:08 -0800Quoted 3 lines
The real way to combat this provide open implementation that demonstrates the correct use of the protocols and show that's more extensible and secure than these "hacks".
Keep dreaming, this won't stop Cisco from doing whatever it wants to do.
Quoted 8 lines
Quoted 5 lines
See QUIC. See TLS. See TCP fast open. See transport layer encryption. These are prime examples where we've steered the Internet from host protocols and implementation to successfully obsolete or at least work around protocol ossification that was perpetuated by router vendors. Cisco is not the Internet!
Seriously, I wish you luck stopping the SRv6 header insertion stuff.
Dave,
I agree we can't stop it, but maybe we can steer it to be at least palatable. There are valid use cases for extension header insertion. Ironically, SRv6 header insertion isn't one of them; the proponents have failed to offer even a single reason why the alternative of IPv6 encapsulation isn't sufficient (believe me, we've asked _many_ times for some justification and only get hand waving!). There are, however, some interesting uses cases like in IOAM where the operator would like to annotate packets as they traverse the network. Encapsulation is insufficient if they don't know what the end point would be or they don't want the annotation to change the path the packets take (versus those that aren't annotated).
Quoted 4 lines
Quoted 1 line
The salient problem with extension header insertion is lost of
And the problems that can be introduced by changing the effective path MTU...
Eric,
Yep, increasing the size of packet in transit potentially wreaks havoc on PMTU discovery, however I personally think that the issue might be overblown. We already have the same problem when tunneling is done in the network since most tunneling implementations and deployments just assume the operator has set large enough MTUs. As long as all the overhead inserted into the packet doesn't reduce the end host PMTU below 1280, PMTU discovery and probably even PTB for a packet with inserted headers still has right effect.
Quoted 18 lines
Quoted 18 lines
attribution. It is fundamental in the IP protocol that the contents of a packet are attributed to the source host identified by the source address. If some intermediate node inserts an extension header that subsequently breaks the packet downstream then there is no obvious way to debug this. If an ICMP message is sent because of the receiving data, then receiving host can't do much with it; it's not the source of the data in error and nothing in the packet tells who the culprit is. The Cisco guys have at least conceded one point on SRv6 insertion due to pushback on this, their latest draft only does SRv6 insertion on packets that have already been encapsulated in IPIP on ingress into the domain. This is intended to at least restrict the modified packets to a controlled domain (I'm note sure if any implementations enforce this though). My proposal is to require an "attribution" HBH option that would clearly identify inserted data put in a packet by middleboxes (draft-herbert-6man-eh-attrib-00). This is a tradeoff to allow extension header insertion, but require protocol to give attribution and make it at least somewhat robust and manageable.
Quoted 4 lines
Quoted 1 line
Tom
FWIW the SRv6 header insertion stuff is still under discussion in spring wg (last I knew). I proposed one option that could be used to
It's also under discussion in 6man.
Quoted 4 lines
avoid insertion (allow for extra scratch space
https://mailarchive.ietf.org/arch/msg/spring/UhThRTNxbHWNiMGgRi3U0SqLaDA),
but nothing has been conclusively resolved last I checked.I saw your proposal. It's a good idea from POV to be conformant with RFC8200 and avoid the PMTU problems, but the header insertion proponents aren't going to like it at all. First, it means that the source is in control of the insertion policy and host is required to change-- no way they'll buy into that ;-). Secondly, if the scratch space isn't used they'll undoubtedly claim that is unnecessary overhead.
Quoted 8 lines
Tom
Quoted 6 lines
As everyone probably knows, the draft-ietf-* documents are working-group-adopted documents (though final publication is never guaranteed). My current reading of 6man tea leaves is that neither "ICMP limits" and "MTU option" docs were terribly contentious. Whether code reorg is important for implementing these I'm not competent enough to say.
--
Signature · 1 line
kernel Dev <[email protected]>
sorry forgot to add the link for the public SRv6 deployment.
https://tools.ietf.org/html/draft-matsushima-spring-srv6-deployment-status-04
Quoted 162 lines · On Sat, 4 Jan 2020 21:02:29 +0200 kernel Dev <[email protected]> wrote:
Hi Tom,
I wasn’t accusing anyone in my message. It is a personal opinion. If my message was misunderstood, then please accept my apologies.
Also SRv6 is not highly controversial and this is proven by its adoption rate and ecosystem.
I have never seen a highly controversial technology that has (in two years) at least 8 public deployments and is supported by 18 publicly known routing platforms from 8 different vendors. Also has support in the mainline of Linux kernel, FD.io VPP, Wireshark, tcpdump, iptables and nftables.If you are a network operator, would you deply a highly controversial technology in your network ?
Quoted 144 lines · On Sat, 4 Jan 2020 09:45:59 -0800 Tom Herbert <[email protected]> wrote:
Quoted 7 lines · kernel Dev
Tom,
I will not go into whether Tom or router vendors is right from IETF perspective as here is not the place to discuss.
But it seems to me that the motivation behind these patches is just to pushback on the current IETF proposals.
Sorry, but that is completely untrue. The patches are a general improvement. The ability to allow modules to register handlers for options code points has nothing to do with "pushback on the current IETF protocols". This sort of registration is a mechanism used all over the place. Similarly, allowing non-priveledged users to send options is not for any specific protocol-- it is a *general* mechanism.
Quoted 2 lines
The patches timeline is completely aligned with when IETF threads get into tough discussions (May 2019, August 2019, and now).
Yes, discussion about new protocols in IETF tends to correlate with development and implementation of the protocols. That shouldn't surprise anyone. SRv6 for instance was highly controversial in IETF and yet the patches went in.
Quoted 1 line
I’m not the one to decide, but IMO people should not add stuff to the kernel just to enforce their opinions on other mailers.
I take exception with your insinuation. Seeing as how you might be new to Linux kernel development I will ignore it. But, in the future, I strongly suggest you be careful about accusing people about their motivations based solely on one interaction.
Tom
Quoted 111 lines
Quoted 95 lines · On Fri, 3 Jan 2020 16:37:33 -0800 Tom Herbert <[email protected]> wrote:
Quoted 41 lines · Erik Kline
Quoted 39 lines · Tom Herbert
Quoted 15 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 14:31:58 -0800Quoted 11 lines · David Miller
Quoted 9 lines
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 09:35:08 -0800Quoted 3 lines
The real way to combat this provide open implementation that demonstrates the correct use of the protocols and show that's more extensible and secure than these "hacks".
Keep dreaming, this won't stop Cisco from doing whatever it wants to do.
Quoted 8 lines
Quoted 5 lines
See QUIC. See TLS. See TCP fast open. See transport layer encryption. These are prime examples where we've steered the Internet from host protocols and implementation to successfully obsolete or at least work around protocol ossification that was perpetuated by router vendors. Cisco is not the Internet!
Seriously, I wish you luck stopping the SRv6 header insertion stuff.
Dave,
I agree we can't stop it, but maybe we can steer it to be at least palatable. There are valid use cases for extension header insertion. Ironically, SRv6 header insertion isn't one of them; the proponents have failed to offer even a single reason why the alternative of IPv6 encapsulation isn't sufficient (believe me, we've asked _many_ times for some justification and only get hand waving!). There are, however, some interesting uses cases like in IOAM where the operator would like to annotate packets as they traverse the network. Encapsulation is insufficient if they don't know what the end point would be or they don't want the annotation to change the path the packets take (versus those that aren't annotated).
Quoted 4 lines
Quoted 1 line
The salient problem with extension header insertion is lost of
And the problems that can be introduced by changing the effective path MTU...
Eric,
Yep, increasing the size of packet in transit potentially wreaks havoc on PMTU discovery, however I personally think that the issue might be overblown. We already have the same problem when tunneling is done in the network since most tunneling implementations and deployments just assume the operator has set large enough MTUs. As long as all the overhead inserted into the packet doesn't reduce the end host PMTU below 1280, PMTU discovery and probably even PTB for a packet with inserted headers still has right effect.
Quoted 18 lines
Quoted 18 lines
attribution. It is fundamental in the IP protocol that the contents of a packet are attributed to the source host identified by the source address. If some intermediate node inserts an extension header that subsequently breaks the packet downstream then there is no obvious way to debug this. If an ICMP message is sent because of the receiving data, then receiving host can't do much with it; it's not the source of the data in error and nothing in the packet tells who the culprit is. The Cisco guys have at least conceded one point on SRv6 insertion due to pushback on this, their latest draft only does SRv6 insertion on packets that have already been encapsulated in IPIP on ingress into the domain. This is intended to at least restrict the modified packets to a controlled domain (I'm note sure if any implementations enforce this though). My proposal is to require an "attribution" HBH option that would clearly identify inserted data put in a packet by middleboxes (draft-herbert-6man-eh-attrib-00). This is a tradeoff to allow extension header insertion, but require protocol to give attribution and make it at least somewhat robust and manageable.
Quoted 4 lines
Quoted 1 line
Tom
FWIW the SRv6 header insertion stuff is still under discussion in spring wg (last I knew). I proposed one option that could be used to
It's also under discussion in 6man.
Quoted 4 lines
avoid insertion (allow for extra scratch space
https://mailarchive.ietf.org/arch/msg/spring/UhThRTNxbHWNiMGgRi3U0SqLaDA),
but nothing has been conclusively resolved last I checked.I saw your proposal. It's a good idea from POV to be conformant with RFC8200 and avoid the PMTU problems, but the header insertion proponents aren't going to like it at all. First, it means that the source is in control of the insertion policy and host is required to change-- no way they'll buy into that ;-). Secondly, if the scratch space isn't used they'll undoubtedly claim that is unnecessary overhead.
Quoted 8 lines
Tom
Quoted 6 lines
As everyone probably knows, the draft-ietf-* documents are working-group-adopted documents (though final publication is never guaranteed). My current reading of 6man tea leaves is that neither "ICMP limits" and "MTU option" docs were terribly contentious. Whether code reorg is important for implementing these I'm not competent enough to say.
--
Signature · 1 line
kernel Dev <[email protected]>
Signature · 1 line
kernel Dev <[email protected]>
Quoted 7 lines · kernel Dev
Hi Tom,
I wasn’t accusing anyone in my message. It is a personal opinion. If my message was misunderstood, then please accept my apologies.
Also SRv6 is not highly controversial and this is proven by its adoption rate and ecosystem.
It was controversial in the five years it look to get to WGLC, and thanks to things like extension header insertion it will remain controversial.
Quoted 2 lines
I have never seen a highly controversial technology that has (in two years) at least 8 public deployments and is supported by 18 publicly known routing platforms from 8 different vendors. Also has support in the mainline of Linux kernel, FD.io VPP, Wireshark, tcpdump, iptables and nftables.
These support only support some subset of the protocol. For instance, SRv6 TLVs including HMAC TLV are defined in SRH, however only Linux claims to support them. However, the Linux implementation isn't protocol conformant: it doesn't support required padding options and just assumes HMAC is the one and only TLV. Previously, I've posted patches to fix that based on the generic parser in this patch set. Those original patches for fixing SRv6 would now be out of date since it was decided to change the PADN option type in SRv6 to be 5 instead of 1 thereby breaking compatibility with HBH and Destination Options. Seeing as how you seem interested in SRv6, it would be nice if you could look into fixing the SRv6 TLV implementation to be conformant (I can repost my original patches if that would help).
Thanks,
Tom
Quoted 154 lines
If you are a network operator, would you deply a highly controversial technology in your network ?
Quoted 23 lines · On Sat, 4 Jan 2020 09:45:59 -0800 Tom Herbert <[email protected]> wrote:
Quoted 7 lines · kernel Dev
Tom,
I will not go into whether Tom or router vendors is right from IETF perspective as here is not the place to discuss.
But it seems to me that the motivation behind these patches is just to pushback on the current IETF proposals.
Sorry, but that is completely untrue. The patches are a general improvement. The ability to allow modules to register handlers for options code points has nothing to do with "pushback on the current IETF protocols". This sort of registration is a mechanism used all over the place. Similarly, allowing non-priveledged users to send options is not for any specific protocol-- it is a *general* mechanism.
Quoted 2 lines
The patches timeline is completely aligned with when IETF threads get into tough discussions (May 2019, August 2019, and now).
Yes, discussion about new protocols in IETF tends to correlate with development and implementation of the protocols. That shouldn't surprise anyone. SRv6 for instance was highly controversial in IETF and yet the patches went in.
Quoted 121 lines
Quoted 1 line
I’m not the one to decide, but IMO people should not add stuff to the kernel just to enforce their opinions on other mailers.
I take exception with your insinuation. Seeing as how you might be new to Linux kernel development I will ignore it. But, in the future, I strongly suggest you be careful about accusing people about their motivations based solely on one interaction.
Tom
Quoted 111 lines
Quoted 95 lines · On Fri, 3 Jan 2020 16:37:33 -0800 Tom Herbert <[email protected]> wrote:
Quoted 41 lines · Erik Kline
Quoted 39 lines · Tom Herbert
Quoted 15 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 14:31:58 -0800Quoted 11 lines · David Miller
Quoted 9 lines
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 09:35:08 -0800Quoted 3 lines
The real way to combat this provide open implementation that demonstrates the correct use of the protocols and show that's more extensible and secure than these "hacks".
Keep dreaming, this won't stop Cisco from doing whatever it wants to do.
Quoted 8 lines
Quoted 5 lines
See QUIC. See TLS. See TCP fast open. See transport layer encryption. These are prime examples where we've steered the Internet from host protocols and implementation to successfully obsolete or at least work around protocol ossification that was perpetuated by router vendors. Cisco is not the Internet!
Seriously, I wish you luck stopping the SRv6 header insertion stuff.
Dave,
I agree we can't stop it, but maybe we can steer it to be at least palatable. There are valid use cases for extension header insertion. Ironically, SRv6 header insertion isn't one of them; the proponents have failed to offer even a single reason why the alternative of IPv6 encapsulation isn't sufficient (believe me, we've asked _many_ times for some justification and only get hand waving!). There are, however, some interesting uses cases like in IOAM where the operator would like to annotate packets as they traverse the network. Encapsulation is insufficient if they don't know what the end point would be or they don't want the annotation to change the path the packets take (versus those that aren't annotated).
Quoted 4 lines
Quoted 1 line
The salient problem with extension header insertion is lost of
And the problems that can be introduced by changing the effective path MTU...
Eric,
Yep, increasing the size of packet in transit potentially wreaks havoc on PMTU discovery, however I personally think that the issue might be overblown. We already have the same problem when tunneling is done in the network since most tunneling implementations and deployments just assume the operator has set large enough MTUs. As long as all the overhead inserted into the packet doesn't reduce the end host PMTU below 1280, PMTU discovery and probably even PTB for a packet with inserted headers still has right effect.
Quoted 18 lines
Quoted 18 lines
attribution. It is fundamental in the IP protocol that the contents of a packet are attributed to the source host identified by the source address. If some intermediate node inserts an extension header that subsequently breaks the packet downstream then there is no obvious way to debug this. If an ICMP message is sent because of the receiving data, then receiving host can't do much with it; it's not the source of the data in error and nothing in the packet tells who the culprit is. The Cisco guys have at least conceded one point on SRv6 insertion due to pushback on this, their latest draft only does SRv6 insertion on packets that have already been encapsulated in IPIP on ingress into the domain. This is intended to at least restrict the modified packets to a controlled domain (I'm note sure if any implementations enforce this though). My proposal is to require an "attribution" HBH option that would clearly identify inserted data put in a packet by middleboxes (draft-herbert-6man-eh-attrib-00). This is a tradeoff to allow extension header insertion, but require protocol to give attribution and make it at least somewhat robust and manageable.
Quoted 4 lines
Quoted 1 line
Tom
FWIW the SRv6 header insertion stuff is still under discussion in spring wg (last I knew). I proposed one option that could be used to
It's also under discussion in 6man.
Quoted 4 lines
avoid insertion (allow for extra scratch space
https://mailarchive.ietf.org/arch/msg/spring/UhThRTNxbHWNiMGgRi3U0SqLaDA),
but nothing has been conclusively resolved last I checked.I saw your proposal. It's a good idea from POV to be conformant with RFC8200 and avoid the PMTU problems, but the header insertion proponents aren't going to like it at all. First, it means that the source is in control of the insertion policy and host is required to change-- no way they'll buy into that ;-). Secondly, if the scratch space isn't used they'll undoubtedly claim that is unnecessary overhead.
Quoted 8 lines
Tom
Quoted 6 lines
As everyone probably knows, the draft-ietf-* documents are working-group-adopted documents (though final publication is never guaranteed). My current reading of 6man tea leaves is that neither "ICMP limits" and "MTU option" docs were terribly contentious. Whether code reorg is important for implementing these I'm not competent enough to say.
--
--
kernel Dev <[email protected]>
Quoted 4 lines · On Sat, 4 Jan 2020 12:22:17 -0800 Tom Herbert <[email protected]> wrote:
Quoted 3 lines · kernel Dev
Hi Tom,
Quoted 8 lines
Quoted 4 lines
I wasn’t accusing anyone in my message. It is a personal opinion. If my message was misunderstood, then please accept my apologies.
Also SRv6 is not highly controversial and this is proven by its adoption rate and ecosystem.
It was controversial in the five years it look to get to WGLC, and thanks to things like extension header insertion it will remain controversial.
But it is not anymore :)
Quoted 4 lines
Quoted 3 lines
I have never seen a highly controversial technology that has (in two years) at least 8 public deployments and is supported by 18 publicly known routing platforms from 8 different vendors. Also has support in the mainline of Linux kernel, FD.io VPP, Wireshark, tcpdump, iptables and nftables.
Quoted 12 lines
These support only support some subset of the protocol. For instance, SRv6 TLVs including HMAC TLV are defined in SRH, however only Linux claims to support them. However, the Linux implementation isn't protocol conformant: it doesn't support required padding options and just assumes HMAC is the one and only TLV. Previously, I've posted patches to fix that based on the generic parser in this patch set. Those original patches for fixing SRv6 would now be out of date since it was decided to change the PADN option type in SRv6 to be 5 instead of 1 thereby breaking compatibility with HBH and Destination Options. Seeing as how you seem interested in SRv6, it would be nice if you could look into fixing the SRv6 TLV implementation to be conformant (I can repost my original patches if that would help).
I’m ok and willing to contribute to add missing pieces of SRv6 to the Linux kernel.
I was just not convinced with the idea of IPv4 extensions headers as we do not need to reinvent the wheel.
We need IPv6 as we ran out of IPv4, and I believe SRv6 can handle most of IPv6 use-cases.
Quoted 159 lines
Thanks,
TomQuoted 154 lines
If you are a network operator, would you deply a highly controversial technology in your network ?
Quoted 23 lines · On Sat, 4 Jan 2020 09:45:59 -0800 Tom Herbert <[email protected]> wrote:
Quoted 7 lines · kernel Dev
Tom,
I will not go into whether Tom or router vendors is right from IETF perspective as here is not the place to discuss.
But it seems to me that the motivation behind these patches is just to pushback on the current IETF proposals.
Sorry, but that is completely untrue. The patches are a general improvement. The ability to allow modules to register handlers for options code points has nothing to do with "pushback on the current IETF protocols". This sort of registration is a mechanism used all over the place. Similarly, allowing non-priveledged users to send options is not for any specific protocol-- it is a *general* mechanism.
Quoted 2 lines
The patches timeline is completely aligned with when IETF threads get into tough discussions (May 2019, August 2019, and now).
Yes, discussion about new protocols in IETF tends to correlate with development and implementation of the protocols. That shouldn't surprise anyone. SRv6 for instance was highly controversial in IETF and yet the patches went in.
Quoted 121 lines
Quoted 1 line
I’m not the one to decide, but IMO people should not add stuff to the kernel just to enforce their opinions on other mailers.
I take exception with your insinuation. Seeing as how you might be new to Linux kernel development I will ignore it. But, in the future, I strongly suggest you be careful about accusing people about their motivations based solely on one interaction.
Tom
Quoted 111 lines
Quoted 95 lines · On Fri, 3 Jan 2020 16:37:33 -0800 Tom Herbert <[email protected]> wrote:
Quoted 41 lines · Erik Kline
Quoted 39 lines · Tom Herbert
Quoted 15 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 14:31:58 -0800Quoted 11 lines · David Miller
Quoted 9 lines
From: Tom Herbert <[email protected]>
Date: Fri, 3 Jan 2020 09:35:08 -0800Quoted 3 lines
The real way to combat this provide open implementation that demonstrates the correct use of the protocols and show that's more extensible and secure than these "hacks".
Keep dreaming, this won't stop Cisco from doing whatever it wants to do.
Quoted 8 lines
Quoted 5 lines
See QUIC. See TLS. See TCP fast open. See transport layer encryption. These are prime examples where we've steered the Internet from host protocols and implementation to successfully obsolete or at least work around protocol ossification that was perpetuated by router vendors. Cisco is not the Internet!
Seriously, I wish you luck stopping the SRv6 header insertion stuff.
Dave,
I agree we can't stop it, but maybe we can steer it to be at least palatable. There are valid use cases for extension header insertion. Ironically, SRv6 header insertion isn't one of them; the proponents have failed to offer even a single reason why the alternative of IPv6 encapsulation isn't sufficient (believe me, we've asked _many_ times for some justification and only get hand waving!). There are, however, some interesting uses cases like in IOAM where the operator would like to annotate packets as they traverse the network. Encapsulation is insufficient if they don't know what the end point would be or they don't want the annotation to change the path the packets take (versus those that aren't annotated).
Quoted 4 lines
Quoted 1 line
The salient problem with extension header insertion is lost of
And the problems that can be introduced by changing the effective path MTU...
Eric,
Yep, increasing the size of packet in transit potentially wreaks havoc on PMTU discovery, however I personally think that the issue might be overblown. We already have the same problem when tunneling is done in the network since most tunneling implementations and deployments just assume the operator has set large enough MTUs. As long as all the overhead inserted into the packet doesn't reduce the end host PMTU below 1280, PMTU discovery and probably even PTB for a packet with inserted headers still has right effect.
Quoted 18 lines
Quoted 18 lines
attribution. It is fundamental in the IP protocol that the contents of a packet are attributed to the source host identified by the source address. If some intermediate node inserts an extension header that subsequently breaks the packet downstream then there is no obvious way to debug this. If an ICMP message is sent because of the receiving data, then receiving host can't do much with it; it's not the source of the data in error and nothing in the packet tells who the culprit is. The Cisco guys have at least conceded one point on SRv6 insertion due to pushback on this, their latest draft only does SRv6 insertion on packets that have already been encapsulated in IPIP on ingress into the domain. This is intended to at least restrict the modified packets to a controlled domain (I'm note sure if any implementations enforce this though). My proposal is to require an "attribution" HBH option that would clearly identify inserted data put in a packet by middleboxes (draft-herbert-6man-eh-attrib-00). This is a tradeoff to allow extension header insertion, but require protocol to give attribution and make it at least somewhat robust and manageable.
Quoted 4 lines
Quoted 1 line
Tom
FWIW the SRv6 header insertion stuff is still under discussion in spring wg (last I knew). I proposed one option that could be used to
It's also under discussion in 6man.
Quoted 4 lines
avoid insertion (allow for extra scratch space
https://mailarchive.ietf.org/arch/msg/spring/UhThRTNxbHWNiMGgRi3U0SqLaDA),
but nothing has been conclusively resolved last I checked.I saw your proposal. It's a good idea from POV to be conformant with RFC8200 and avoid the PMTU problems, but the header insertion proponents aren't going to like it at all. First, it means that the source is in control of the insertion policy and host is required to change-- no way they'll buy into that ;-). Secondly, if the scratch space isn't used they'll undoubtedly claim that is unnecessary overhead.
Quoted 8 lines
Tom
Quoted 6 lines
As everyone probably knows, the draft-ietf-* documents are working-group-adopted documents (though final publication is never guaranteed). My current reading of 6man tea leaves is that neither "ICMP limits" and "MTU option" docs were terribly contentious. Whether code reorg is important for implementing these I'm not competent enough to say.
--
--
kernel Dev <[email protected]>
Signature · 1 line
kernel Dev <[email protected]>