bool default_config;
bool wireless;
bool wireless_ap;
+ bool wireless_proxyarp;
bool wireless_isolate;
bool bpdu_filter;
local multicast_to_unicast="$1"
local isolate
- json_get_var isolate isolate
+ json_get_vars isolate proxy_arp
[ ${isolate:-0} -gt 0 -o -z "$network_bridge" ] && return
- [ ${multicast_to_unicast:-1} -gt 0 ] && json_add_boolean isolate 1
+ [ ${multicast_to_unicast:-1} -gt 0 -o ${proxy_arp:-0} -gt 0 ] && json_add_boolean isolate 1
}
for_each_interface() {
system_set_dev_sysfs("brport/hairpin_mode", dev->ifname, val);
}
+static void system_bridge_set_proxyarp_wifi(struct device *dev, const char *val)
+{
+ system_set_dev_sysfs("brport/proxyarp_wifi", dev->ifname, val);
+}
+
static void system_bridge_set_bpdu_filter(struct device *dev, const char *val)
{
system_set_dev_sysfs("brport/bpdu_filter", dev->ifname, val);
system_bridge_set_wireless(struct device *bridge, struct device *dev)
{
bool mcast_to_ucast = dev->wireless_ap;
- bool hairpin = true;
+ bool hairpin;
if (bridge->settings.flags & DEV_OPT_MULTICAST_TO_UNICAST &&
!bridge->settings.multicast_to_unicast)
mcast_to_ucast = false;
- if (!mcast_to_ucast || dev->wireless_isolate)
+ hairpin = mcast_to_ucast || dev->wireless_proxyarp;
+ if (dev->wireless_isolate)
hairpin = false;
system_bridge_set_multicast_to_unicast(dev, mcast_to_ucast ? "1" : "0");
system_bridge_set_hairpin_mode(dev, hairpin ? "1" : "0");
+ system_bridge_set_proxyarp_wifi(dev, dev->wireless_proxyarp ? "1" : "0");
}
int system_bridge_addif(struct device *bridge, struct device *dev)
VIF_ATTR_NETWORK,
VIF_ATTR_ISOLATE,
VIF_ATTR_MODE,
+ VIF_ATTR_PROXYARP,
__VIF_ATTR_MAX,
};
[VIF_ATTR_NETWORK] = { .name = "network", .type = BLOBMSG_TYPE_ARRAY },
[VIF_ATTR_ISOLATE] = { .name = "isolate", .type = BLOBMSG_TYPE_BOOL },
[VIF_ATTR_MODE] = { .name = "mode", .type = BLOBMSG_TYPE_STRING },
+ [VIF_ATTR_PROXYARP] = { .name = "proxy_arp", .type = BLOBMSG_TYPE_BOOL },
};
static const struct uci_blob_param_list vif_param = {
struct device *dev = device_get(ifname, 2);
if (dev) {
dev->wireless_isolate = vif->isolate;
+ dev->wireless_proxyarp = vif->proxyarp;
dev->wireless = true;
dev->wireless_ap = vif->ap_mode;
dev->bpdu_filter = dev->wireless_ap && ifname == vif->ifname;
if (cur)
vif->isolate = blobmsg_get_bool(cur);
+ cur = tb[VIF_ATTR_PROXYARP];
+ if (cur)
+ vif->proxyarp = blobmsg_get_bool(cur);
+
cur = tb[VIF_ATTR_MODE];
if (cur)
vif->ap_mode = !strcmp(blobmsg_get_string(cur), "ap");
const char *ifname;
struct blob_attr *network;
+ bool proxyarp;
bool isolate;
bool ap_mode;
};