On Fri, May 19, 2023 at 04:44:38PM +0200, Holger Glaess wrote:
> hi
> 
> 
> if you do an "ifconfig mpeX" , will not show the configured tunneldomain.
> 
> /etc 59>ifconfig mpe1
> mpe1: flags=51<UP,POINTOPOINT,RUNNING> rdomain 200 mtu 1500
> ???? ??index 82 priority 0 llprio 3
> ???? ??encap: txprio 0 rxprio packet
> ???? ??mpls: label 200
> ???? ??groups: mpe
> ???? ??inet 172.16.2.201 --> 0.0.0.0 netmask 0xffffffff
> 
> /etc 60>cat hostname.mpe1
> rdomain 200
> inet 172.16.2.201/32
> -inet6
> mplslabel 200
> tunneldomain 20
> up
> 
> tunneldomain option works

looks like ifconfig only tries to display the tunneldomain if the
interface also provides "tunnel" addresses, which mpe does not do
because it uses labels instead.

this has the mpls line in ifconfig try and print the rdomain too. can you
try it?

Index: ifconfig.c
===================================================================
RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v
retrieving revision 1.462
diff -u -p -r1.462 ifconfig.c
--- ifconfig.c  8 Mar 2023 04:43:06 -0000       1.462
+++ ifconfig.c  20 May 2023 00:17:43 -0000
@@ -3982,6 +3985,10 @@ mpls_status(void)
        } else
                printf("\tmpls: label %u", shim.shim_label);
 
+       if (ioctl(sock, SIOCGLIFPHYRTABLE, (caddr_t)&ifr) == 0 &&
+           (rdomainid != 0 || ifr.ifr_rdomainid != 0))
+               printf(" rdomain %d", ifr.ifr_rdomainid);
+
        pwe3_neighbor();
        pwe3_cword();
        pwe3_fword();

Reply via email to