-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ip6tnlEncap to insert ip6tnl encap route
This commit added support to allow the operation of ip6tnl encapsulation. It is equivalent to the iproute2 command, e.g., ip route add 192.168.99.0/24 encap ip6 dst 2001:db8:: dev ip6-tunnel The limitation include that the options field defined in encap nl route attribute is not implenmented yet. Testcase is included.
- Loading branch information
Showing
3 changed files
with
184 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package nl | ||
|
||
// id's of route attribute from https://elixir.bootlin.com/linux/v5.17.3/source/include/uapi/linux/lwtunnel.h#L38 | ||
// the value's size are specified in https://elixir.bootlin.com/linux/v5.17.3/source/net/ipv4/ip_tunnel_core.c#L928 | ||
|
||
const ( | ||
LWTUNNEL_IP6_UNSPEC = iota | ||
LWTUNNEL_IP6_ID | ||
LWTUNNEL_IP6_DST | ||
LWTUNNEL_IP6_SRC | ||
LWTUNNEL_IP6_HOPLIMIT | ||
LWTUNNEL_IP6_TC | ||
LWTUNNEL_IP6_FLAGS | ||
LWTUNNEL_IP6_PAD // not implemented | ||
LWTUNNEL_IP6_OPTS // not implemented | ||
__LWTUNNEL_IP6_MAX | ||
) | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters