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/if_netlink.c | |
| 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/if_netlink.c')
| -rw-r--r-- | zebra/if_netlink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index 7ef3fa2e61..1cfcc84bd9 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -221,6 +221,8 @@ static void netlink_determine_zebra_iftype(const char *kind, *zif_type = ZEBRA_IF_BOND; else if (strcmp(kind, "gre") == 0) *zif_type = ZEBRA_IF_GRE; + else if (strcmp(kind, "dummy") == 0) + *zif_type = ZEBRA_IF_DUMMY; } static void netlink_vrf_change(struct nlmsghdr *h, struct rtattr *tb, @@ -576,6 +578,7 @@ static void netlink_interface_update_l2info(struct zebra_dplane_ctx *ctx, case ZEBRA_IF_MACVLAN: case ZEBRA_IF_VETH: case ZEBRA_IF_BOND: + case ZEBRA_IF_DUMMY: break; } } |
