summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/network/ipv4/ipv4.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/tcpip/network/ipv4/ipv4.go')
-rw-r--r--pkg/tcpip/network/ipv4/ipv4.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/tcpip/network/ipv4/ipv4.go b/pkg/tcpip/network/ipv4/ipv4.go
index 18078c74c..cde536e7e 100644
--- a/pkg/tcpip/network/ipv4/ipv4.go
+++ b/pkg/tcpip/network/ipv4/ipv4.go
@@ -452,7 +452,7 @@ func (e *endpoint) SendIcmp(pkt tcpip.PacketBuffer, icmpv4type header.ICMPv4Type
return nil
}
-func (*endpoint) UpdateTTL(pkt tcpip.PacketBuffer, n uint8) *tcpip.Error {
+func (e *endpoint) UpdateTTL(pkt tcpip.PacketBuffer, n uint8) *tcpip.Error {
headerView := pkt.Header.View()
h := header.IPv4(headerView)
if !h.IsValid(pkt.Data.Size()) {
@@ -464,6 +464,7 @@ func (*endpoint) UpdateTTL(pkt tcpip.PacketBuffer, n uint8) *tcpip.Error {
ttl := h.TTL()
if ttl <= n {
+ e.SendIcmp(pkt, header.ICMPv4TimeExceeded, 0, 0)
return tcpip.ErrTimeout
}
h.UpdateTTL(n)