Interface based L4 protocol demux - IPv6 only (so far). With the added methods, one ...
8 years, 6 months ago
(2015-11-03 22:55:37 UTC)
#1
Interface based L4 protocol demux - IPv6 only (so far).
With the added methods, one can bind a specific L4 protocol (e.g., an ICMP
variant) to a specific interface.
The same method could be used to add a TCP or UDP shim layer working only for a
specific interface (e.g., a PEP), even tough I didn't had this in mind.
Still, it's a nice idea.
The method can be easily extended to IPv4.
On 2015/11/05 22:52:27, Tom Henderson wrote: > +1 with suggested revisions (also make similar IPv4 ...
8 years, 6 months ago
(2015-11-06 00:18:29 UTC)
#3
On 2015/11/05 22:52:27, Tom Henderson wrote:
> +1 with suggested revisions (also make similar IPv4 changes, please)
>
>
https://codereview.appspot.com/270630043/diff/1/src/internet/model/ipv6-l3-pr...
> File src/internet/model/ipv6-l3-protocol.cc (right):
>
>
https://codereview.appspot.com/270630043/diff/1/src/internet/model/ipv6-l3-pr...
> src/internet/model/ipv6-l3-protocol.cc:716: NS_LOG_FUNCTION (this << protocol
<<
> interfaceIndex);
> suggest to check and warn or fatal error if key already exists
>
>
https://codereview.appspot.com/270630043/diff/1/src/internet/model/ipv6-l3-pr...
> src/internet/model/ipv6-l3-protocol.cc:731: L4ListKey_t key = std::make_pair
> (protocol->GetProtocolNumber (), interfaceIndex);
> suggest to warn or fatal error if key is not found
>
>
https://codereview.appspot.com/270630043/diff/1/src/internet/model/ipv6-l3-pr...
> File src/internet/model/ipv6-l3-protocol.h (right):
>
>
https://codereview.appspot.com/270630043/diff/1/src/internet/model/ipv6-l3-pr...
> src/internet/model/ipv6-l3-protocol.h:116: * \param interfaceIndex interface
> index.
> suggest to add to Doxygen:
>
> "This may be called multiple times for multiple interfaces for the same
> protocol. To insert for all interfaces, use the separate Insert
> (Ptr<IpL4Protocol> protocol) method."
All done.I added warnings and not asserts to double protocol insertion because
it can be a legal way to override a previous protocol binding (without having to
remove the old one first).
There is only one quick in the whole patch, but I plan to add it as a
bug/enhancement: the ICMP Forward functions (used to forward ICMP errors to TCP,
UDP, etc.) are using the default protocols and not the interface specific ones.
In order to fix this, it is necessary to change the function signature. While
this is possible, so far no protocol is actually reacting to ICMP error messages
(pity). It could be relevant for TCP PMTU discovery tho.
Summarizing, i'll add this limitation in Bugzilla, with references to the
existing bugs.
Issue 270630043: Interface index based L4 protocols
(Closed)
Created 8 years, 6 months ago by Tommaso Pecorella
Modified 8 years, 6 months ago
Reviewers: Tom Henderson
Base URL:
Comments: 3