network: disable IPv4LL for ipvlan with L3 or L3S mode
As L3 or L3S mode do not support ARP.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "netdev/ipvlan.h"
|
||||
#include "networkd-link.h"
|
||||
#include "string-table.h"
|
||||
|
||||
static const char* const ipvlan_mode_table[_NETDEV_IPVLAN_MODE_MAX] = {
|
||||
@@ -85,3 +86,18 @@ const NetDevVTable ipvtap_vtable = {
|
||||
.fill_message_create = netdev_ipvlan_fill_message_create,
|
||||
.create_type = NETDEV_CREATE_STACKED,
|
||||
};
|
||||
|
||||
IPVlanMode link_get_ipvlan_mode(Link *link) {
|
||||
NetDev *netdev;
|
||||
|
||||
if (!streq_ptr(link->kind, "ipvlan"))
|
||||
return _NETDEV_IPVLAN_MODE_INVALID;
|
||||
|
||||
if (netdev_get(link->manager, link->ifname, &netdev) < 0)
|
||||
return _NETDEV_IPVLAN_MODE_INVALID;
|
||||
|
||||
if (netdev->kind != NETDEV_KIND_IPVLAN)
|
||||
return _NETDEV_IPVLAN_MODE_INVALID;
|
||||
|
||||
return IPVLAN(netdev)->mode;
|
||||
}
|
||||
|
||||
@@ -42,3 +42,5 @@ IPVlanFlags ipvlan_flags_from_string(const char *d) _pure_;
|
||||
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_ipvlan_mode);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_ipvlan_flags);
|
||||
|
||||
IPVlanMode link_get_ipvlan_mode(Link *link);
|
||||
|
||||
Reference in New Issue
Block a user