--- src/iface.c.orig 2013-06-11 16:00:00.000000000 +0700 +++ src/iface.c 2015-10-23 15:46:27.000000000 +0700 @@ -3645,6 +3665,9 @@ IfaceSetName(Bund b, const char * ifname * %I for interface name; * %l for name of bundle's first link * %M for peer MAC address of bundle's first link + * %o for local outer ("physical") address of bundle's first link + * %O for peer outer ("physical") address of bundle's first link + * %P for peer outer ("physical") port of bundle's first link * %S for interface status (DoD/UP/DOWN) * %t for type of bundle's first link (pppoe, pptp, l2tp etc.) * %u for self auth name (or dash if self auth name not used) @@ -3780,6 +3803,27 @@ IfaceSetDescr(Bund b, const char * templ DST_COPY("-"); } break; + case 'o': + if(b->links[0] && PhysGetSelfAddr(b->links[0], buf, sizeof(buf)) == 0) { + DST_COPY(buf); + } else { + DST_COPY("-"); + } + break; + case 'O': + if(b->links[0] && PhysGetPeerAddr(b->links[0], buf, sizeof(buf)) == 0) { + DST_COPY(buf); + } else { + DST_COPY("-"); + } + break; + case 'P': + if(b->links[0] && PhysGetPeerPort(b->links[0], buf, sizeof(buf)) == 0) { + DST_COPY(buf); + } else { + DST_COPY("-"); + } + break; /* interface status */ case 'S': DST_COPY(iface->up ? (iface->dod ? "DoD" : "UP") : "DOWN");