Why we need add :: at the last when encap seg6 with inline mode?

From: Hangbin Liu <hidden>
Date: 2023-06-27 07:28:27

Hi David,

When I tried encap seg6 inline mode via iproute, I saw it added a :: address
at the last.

# ip -6 route add 1234::1234 encap seg6 mode inline segs 1::1 dev dum1
# ip -6 route show dev dum1
1234::1234  encap seg6 mode inline segs 2 [ 1::1 :: ] metric 1024 pref medium

In the iproute2 code
static struct ipv6_sr_hdr *parse_srh(char *segbuf, int hmac, bool encap)
{
        ...
        if (!encap)
                nsegs++;
        ...
So is there any reason we add this?

Thanks
Hangbin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help