Skip to content

Commit e73a824

Browse files
committed
Merge branch 'release/v2.22' into release/v2
2 parents 8847966 + 3d7f416 commit e73a824

File tree

7 files changed

+343
-10
lines changed

7 files changed

+343
-10
lines changed

CHANGELOG.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# For older changes, see CHANGELOG.OLD.md
2626
items:
2727
- version: 2.23.0
28-
date: (TBD)
28+
date: 2025-03-29
2929
notes:
3030
- type: feature
3131
title: New telepresence wiretap command
@@ -36,6 +36,16 @@ items:
3636
Similar to an `ingest`, a `wiretap` will always enforce read-only status on all volume mounts, and since that
3737
makes the `wiretap` completely read-only, there's no limit to how many simultaneous wiretaps that can be
3838
served. In fact, a `wiretap` and an `intercept` on the same port can run simultaneously.
39+
- version: 2.22.2
40+
date: 2025-03-28
41+
notes:
42+
- type: bugfix
43+
title: Panic when using telepresence replace in a IPv6-only cluster
44+
body: |-
45+
A "slice bounds out of range" would occur when the targeted Pod's Traffic Agent requested a local dialer to
46+
be created on the client. This was due to a glitch in the VPN-tunnel implementation that got triggered when
47+
a remote IPv6-address was combined with a local IPv4-address.
48+
docs: https://github.com/telepresenceio/telepresence/issues/3828
3949
- version: 2.22.1
4050
date: 2025-03-27
4151
notes:

docs/release-notes.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11

22
[comment]: # (Code generated by relnotesgen. DO NOT EDIT.)
33
# <img src="images/logo.png" height="64px"/> Telepresence Release Notes
4-
## Version 2.23.0
4+
## Version 2.23.0 <span style="font-size: 16px;">(March 29)</span>
55
## <div style="display:flex;"><img src="images/feature.png" alt="feature" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">New telepresence wiretap command</div></div>
66
<div style="margin-left: 15px">
77

88
The new `telepresence wiretap` command introduces a read-only form of an `intercept` where the original container will run unaffected while a copy of the wiretapped traffic is sent to the client.
99
Similar to an `ingest`, a `wiretap` will always enforce read-only status on all volume mounts, and since that makes the `wiretap` completely read-only, there's no limit to how many simultaneous wiretaps that can be served. In fact, a `wiretap` and an `intercept` on the same port can run simultaneously.
1010
</div>
1111

12+
## Version 2.22.2 <span style="font-size: 16px;">(March 28)</span>
13+
## <div style="display:flex;"><img src="images/bugfix.png" alt="bugfix" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">[Panic when using telepresence replace in a IPv6-only cluster](https://github.com/telepresenceio/telepresence/issues/3828)</div></div>
14+
<div style="margin-left: 15px">
15+
16+
A "slice bounds out of range" would occur when the targeted Pod's Traffic Agent requested a local dialer to
17+
be created on the client. This was due to a glitch in the VPN-tunnel implementation that got triggered when
18+
a remote IPv6-address was combined with a local IPv4-address.
19+
</div>
20+
1221
## Version 2.22.1 <span style="font-size: 16px;">(March 27)</span>
1322
## <div style="display:flex;"><img src="images/bugfix.png" alt="bugfix" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">Only restore inactive traffic-agent after a replace.</div></div>
1423
<div style="margin-left: 15px">

docs/release-notes.mdx

+10-1
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,23 @@ import { Note, Title, Body } from '@site/src/components/ReleaseNotes'
77
[comment]: # (Code generated by relnotesgen. DO NOT EDIT.)
88

99
# Telepresence Release Notes
10-
## Version 2.23.0
10+
## Version 2.23.0 <span style={{fontSize:'16px'}}>(March 29)</span>
1111
<Note>
1212
<Title type="feature">New telepresence wiretap command</Title>
1313
<Body>
1414
The new `telepresence wiretap` command introduces a read-only form of an `intercept` where the original container will run unaffected while a copy of the wiretapped traffic is sent to the client.
1515
Similar to an `ingest`, a `wiretap` will always enforce read-only status on all volume mounts, and since that makes the `wiretap` completely read-only, there's no limit to how many simultaneous wiretaps that can be served. In fact, a `wiretap` and an `intercept` on the same port can run simultaneously.
1616
</Body>
1717
</Note>
18+
## Version 2.22.2 <span style={{fontSize:'16px'}}>(March 28)</span>
19+
<Note>
20+
<Title type="bugfix" docs="https://github.com/telepresenceio/telepresence/issues/3828">Panic when using telepresence replace in a IPv6-only cluster</Title>
21+
<Body>
22+
A "slice bounds out of range" would occur when the targeted Pod's Traffic Agent requested a local dialer to
23+
be created on the client. This was due to a glitch in the VPN-tunnel implementation that got triggered when
24+
a remote IPv6-address was combined with a local IPv4-address.
25+
</Body>
26+
</Note>
1827
## Version 2.22.1 <span style={{fontSize:'16px'}}>(March 27)</span>
1928
<Note>
2029
<Title type="bugfix">Only restore inactive traffic-agent after a replace.</Title>

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ require (
3939
github.com/stretchr/testify v1.10.0
4040
github.com/telepresenceio/go-fuseftp v0.6.6
4141
github.com/telepresenceio/go-fuseftp/rpc v0.6.6
42-
github.com/telepresenceio/telepresence/rpc/v2 v2.22.1
42+
github.com/telepresenceio/telepresence/rpc/v2 v2.22.2
4343
github.com/vishvananda/netlink v1.3.0
4444
golang.org/x/net v0.37.0
4545
golang.org/x/sys v0.31.0

pkg/tunnel/connid.go

+14-5
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,24 @@ func ConnIDFromUDP(src, dst *net.UDPAddr) ConnID {
2121
func NewConnID(proto int, src, dst netip.AddrPort) ConnID {
2222
srcAddr := src.Addr()
2323
dstAddr := dst.Addr()
24-
if srcAddr.Is4In6() {
24+
switch {
25+
case srcAddr.Is4():
26+
if dstAddr.Is4In6() {
27+
dstAddr = dstAddr.Unmap()
28+
} else if dstAddr.Is6() {
29+
srcAddr = netip.AddrFrom16(srcAddr.As16())
30+
}
31+
case srcAddr.Is4In6():
2532
if dstAddr.Is4() {
2633
srcAddr = srcAddr.Unmap()
2734
} else if dstAddr.Is4In6() {
2835
srcAddr = srcAddr.Unmap()
2936
dstAddr = dstAddr.Unmap()
3037
}
31-
} else if srcAddr.Is4() && dstAddr.Is4In6() {
32-
dstAddr = dstAddr.Unmap()
38+
default:
39+
if dstAddr.Is4() {
40+
dstAddr = netip.AddrFrom16(dstAddr.As16())
41+
}
3342
}
3443

3544
ls := srcAddr.BitLen() / 8
@@ -63,12 +72,12 @@ func (id ConnID) areBothIPv4() bool {
6372

6473
// IsSourceIPv4 returns true if the source of this ConnID is IPv4.
6574
func (id ConnID) IsSourceIPv4() bool {
66-
return id.areBothIPv4() || net.IP(id[0:16]).To4() != nil
75+
return id.areBothIPv4() || len(id) > 16 && net.IP(id[0:16]).To4() != nil
6776
}
6877

6978
// IsDestinationIPv4 returns true if the destination of this ConnID is IPv4.
7079
func (id ConnID) IsDestinationIPv4() bool {
71-
return id.areBothIPv4() || net.IP(id[18:34]).To4() != nil
80+
return id.areBothIPv4() || len(id) == 37 && net.IP(id[18:34]).To4() != nil
7281
}
7382

7483
// Source returns the source address and port.

0 commit comments

Comments
 (0)