summaryrefslogtreecommitdiffhomepage
path: root/device.h
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2016-02-12 22:04:00 +0200
committerDaniel Golle <daniel@makrotopia.org>2017-01-10 12:48:39 +0100
commitabf52371db75eb449f12209ca1b7ffaa9d2baa22 (patch)
treefcf53af6c81932f51b882616718e3eb28010450b /device.h
parent64a655d8ffa9f0cea1bbdd35cac6b3b99b865270 (diff)
netifd: Add sendredirects config support
Setting /proc/sys/net/ipv4/conf/*/send_redirects is useful if a single layer-2 domain is shared among routed subnets. Sending redirects will prevents traffic from taking unnessesary detours through a gateway in cases where direct connectivity on layer 2 exists. This is commonly the case if an existing LAN infratructure with dump switches is used to additionally carry routing protocols like OLSR which are supported only by some nodes on the network. It's important to note that the default value for send_redirects differs for interface types (it's enabled on physical ethernet interfaces, but disabled e.g. on VLANs) due to olsrd changing /proc/sys/net/ipv4/conf/default/send_redirects during boot, thus the default differs also depending e.g. on the way an on-board switch is integrated on specific boards (as eth0 exists before olsrd is started, eth0.1 gets created by netifd later on...) Having a way to explicitely enable or disable send_redirects is thus desireable also to unify the default behaviour among different, but seemingly similar devices supported. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'device.h')
-rw-r--r--device.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/device.h b/device.h
index 2af93bb..3c172ce 100644
--- a/device.h
+++ b/device.h
@@ -50,6 +50,7 @@ enum {
DEV_ATTR_LEARNING,
DEV_ATTR_UNICAST_FLOOD,
DEV_ATTR_NEIGHGCSTALETIME,
+ DEV_ATTR_SENDREDIRECTS,
__DEV_ATTR_MAX,
};
@@ -101,6 +102,7 @@ enum {
DEV_OPT_UNICAST_FLOOD = (1 << 18),
DEV_OPT_NEIGHGCSTALETIME = (1 << 19),
DEV_OPT_MULTICAST_FAST_LEAVE = (1 << 20),
+ DEV_OPT_SENDREDIRECTS = (1 << 17),
};
/* events broadcasted to all users of a device */
@@ -167,6 +169,7 @@ struct device_settings {
bool multicast;
bool learning;
bool unicast_flood;
+ bool sendredirects;
};
/*