diff options
| author | Gabriel Goller <g.goller@proxmox.com> | 2025-02-25 10:13:34 +0100 |
|---|---|---|
| committer | Gabriel Goller <g.goller@proxmox.com> | 2025-02-25 10:13:34 +0100 |
| commit | 80e96712e47b024ed5973c738acfb056bcd08b61 (patch) | |
| tree | e61b8a1796c928041be2b079dfc1d82e94ed3087 /zebra/interface.h | |
| parent | 3f290c97e8325bd9db9363b60e4a42ba8bdca90b (diff) | |
zebra: add ZEBRA_IF_DUMMY flag for dummy interfaces
Introduce ZEBRA_IF_DUMMY interface flag to identify Linux dummy interfaces [0].
These interfaces behave similarly to loopback interfaces and can be
specially handled by daemons.
[0]: https://github.com/torvalds/linux/blob/master/drivers/net/dummy.c
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Diffstat (limited to 'zebra/interface.h')
| -rw-r--r-- | zebra/interface.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/zebra/interface.h b/zebra/interface.h index 2c7a079bf4..34e57088a7 100644 --- a/zebra/interface.h +++ b/zebra/interface.h @@ -39,7 +39,8 @@ enum zebra_iftype { ZEBRA_IF_MACVLAN, /* MAC VLAN interface*/ ZEBRA_IF_VETH, /* VETH interface*/ ZEBRA_IF_BOND, /* Bond */ - ZEBRA_IF_GRE, /* GRE interface */ + ZEBRA_IF_GRE, /* GRE interface */ + ZEBRA_IF_DUMMY, /* Dummy interface */ }; /* Zebra "slave" interface type */ @@ -246,6 +247,9 @@ DECLARE_HOOK(zebra_if_extra_info, (struct vty * vty, struct interface *ifp), #define IS_ZEBRA_IF_GRE(ifp) \ (((struct zebra_if *)(ifp->info))->zif_type == ZEBRA_IF_GRE) +#define IS_ZEBRA_IF_DUMMY(ifp) \ + (((struct zebra_if *)(ifp->info))->zif_type == ZEBRA_IF_DUMMY) + #define IS_ZEBRA_IF_BRIDGE_SLAVE(ifp) \ (((struct zebra_if *)(ifp->info))->zif_slave_type \ == ZEBRA_IF_SLAVE_BRIDGE) |
