DEV_ATTR_NEIGHLOCKTIME,
DEV_ATTR_ISOLATE,
DEV_ATTR_IP6SEGMENTROUTING,
+ DEV_ATTR_DROP_V4_UNICAST_IN_L2_MULTICAST,
+ DEV_ATTR_DROP_V6_UNICAST_IN_L2_MULTICAST,
+ DEV_ATTR_DROP_GRATUITOUS_ARP,
+ DEV_ATTR_DROP_UNSOLICITED_NA,
+ DEV_ATTR_ARP_ACCEPT,
+ DEV_ATTR_AUTH,
__DEV_ATTR_MAX,
};
struct blob_attr *attr);
void (*config_init)(struct device *);
enum dev_change_type (*reload)(struct device *, struct blob_attr *);
+ void (*vlan_update)(struct device *);
void (*dump_info)(struct device *, struct blob_buf *buf);
void (*dump_stats)(struct device *, struct blob_buf *buf);
int (*check_state)(struct device *);
DEV_OPT_MLDVERSION = (1 << 8),
DEV_OPT_NEIGHREACHABLETIME = (1 << 9),
DEV_OPT_DEFAULT_MACADDR = (1 << 10),
- /* 1 bit hole */
+ DEV_OPT_AUTH = (1 << 11),
DEV_OPT_MTU6 = (1 << 12),
DEV_OPT_DADTRANSMITS = (1 << 13),
DEV_OPT_MULTICAST_TO_UNICAST = (1 << 14),
DEV_OPT_NEIGHLOCKTIME = (1 << 22),
DEV_OPT_ISOLATE = (1 << 23),
DEV_OPT_IP6SEGMENTROUTING = (1 << 24),
+ DEV_OPT_DROP_V4_UNICAST_IN_L2_MULTICAST = (1 << 25),
+ DEV_OPT_DROP_V6_UNICAST_IN_L2_MULTICAST = (1 << 26),
+ DEV_OPT_DROP_GRATUITOUS_ARP = (1 << 27),
+ DEV_OPT_DROP_UNSOLICITED_NA = (1 << 28),
+ DEV_OPT_ARP_ACCEPT = (1 << 29),
};
/* events broadcasted to all users of a device */
DEV_EVENT_UP,
DEV_EVENT_DOWN,
+ DEV_EVENT_AUTH_UP,
DEV_EVENT_LINK_UP,
DEV_EVENT_LINK_DOWN,
bool sendredirects;
bool ip6segmentrouting;
bool isolate;
+ bool drop_v4_unicast_in_l2_multicast;
+ bool drop_v6_unicast_in_l2_multicast;
+ bool drop_gratuitous_arp;
+ bool drop_unsolicited_na;
+ bool arp_accept;
+ bool auth;
};
/*
int active;
/* DEV_EVENT_LINK_UP */
bool link_active;
+ bool auth_status;
bool external;
bool disabled;
struct device_hotplug_ops {
int (*prepare)(struct device *dev, struct device **bridge_dev);
int (*add)(struct device *main, struct device *member, struct blob_attr *vlan);
- int (*del)(struct device *main, struct device *member);
+ int (*del)(struct device *main, struct device *member, struct blob_attr *vlan);
};
enum bridge_vlan_flags {
uint16_t vid;
bool local;
+ bool pending;
};
extern const struct uci_blob_param_list device_attr_list;
void alias_notify_device(const char *name, struct device *dev);
struct device *device_alias_get(const char *name);
+void device_set_auth_status(struct device *dev, bool value);
+
static inline void
device_set_deferred(struct device *dev, bool value)
{
device_refresh_present(dev);
}
+static inline bool
+device_link_active(struct device *dev)
+{
+ if (dev->settings.auth && !dev->auth_status)
+ return false;
+
+ return dev->link_active;
+}
+
bool device_check_ip6segmentrouting(void);
#endif