Skip to content

Commit 9e27cbe

Browse files
committed
iptunnel: add ip6 capability flags
Signed-off-by: Jan Vaclav <[email protected]>
1 parent 2b392d3 commit 9e27cbe

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

src/link/link_info/iptunnel.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ const IP6_TNL_F_RCV_DSCP_COPY: u32 = 0x10;
356356
const IP6_TNL_F_USE_ORIG_FWMARK: u32 = 0x20;
357357
const IP6_TNL_F_ALLOW_LOCAL_REMOTE: u32 = 0x40;
358358

359+
const IP6_TNL_F_CAP_XMIT: u32 = 0x10000;
360+
const IP6_TNL_F_CAP_RCV: u32 = 0x20000;
361+
const IP6_TNL_F_CAP_PER_PACKET: u32 = 0x40000;
362+
359363
bitflags! {
360364
#[non_exhaustive]
361365
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
@@ -367,5 +371,8 @@ bitflags! {
367371
const RcvDscpCopy = IP6_TNL_F_RCV_DSCP_COPY;
368372
const UseOrigFwMark = IP6_TNL_F_USE_ORIG_FWMARK;
369373
const AllowLocalRemote = IP6_TNL_F_ALLOW_LOCAL_REMOTE;
374+
const CapXmit = IP6_TNL_F_CAP_XMIT;
375+
const CapRcv = IP6_TNL_F_CAP_RCV;
376+
const CapPerPacket = IP6_TNL_F_CAP_PER_PACKET;
370377
}
371378
}

src/link/tests/iptunnel.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ fn test_iptunnel_ipip6_link_info() {
127127
InfoIpTunnel::Ttl(64),
128128
InfoIpTunnel::EncapLimit(4),
129129
InfoIpTunnel::FlowInfo(0),
130-
InfoIpTunnel::Ipv6Flags(Ip6TunnelFlags::from_bits_retain(
131-
0x30000,
132-
)),
130+
InfoIpTunnel::Ipv6Flags(
131+
Ip6TunnelFlags::CapXmit | Ip6TunnelFlags::CapRcv,
132+
),
133133
InfoIpTunnel::Protocol(IpProtocol::Ipip),
134134
InfoIpTunnel::FwMark(0),
135135
InfoIpTunnel::EncapType(TunnelEncapType::None),
@@ -198,9 +198,9 @@ fn test_iptunnel_ip6ip6_link_info() {
198198
InfoIpTunnel::Ttl(64),
199199
InfoIpTunnel::EncapLimit(4),
200200
InfoIpTunnel::FlowInfo(0),
201-
InfoIpTunnel::Ipv6Flags(Ip6TunnelFlags::from_bits_retain(
202-
0x30000,
203-
)),
201+
InfoIpTunnel::Ipv6Flags(
202+
Ip6TunnelFlags::CapXmit | Ip6TunnelFlags::CapRcv,
203+
),
204204
InfoIpTunnel::Protocol(IpProtocol::Ipv6),
205205
InfoIpTunnel::FwMark(0),
206206
InfoIpTunnel::EncapType(TunnelEncapType::None),

0 commit comments

Comments
 (0)