diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-01-24 00:52:32 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-01-24 00:52:32 +0100 |
commit | c6b739e28f2b15789c95dd28af3f193ec8f67531 (patch) | |
tree | 231245e5c0429b4dda370fda67aa0dc5b2093fb4 /utils.h | |
parent | 5fefb43a4151ee99d4c78ebaf1807043e859021a (diff) | |
download | netifd-c6b739e28f2b15789c95dd28af3f193ec8f67531.tar.gz |
add a generic option for disabling the automatic default route on interfaces
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -3,6 +3,15 @@ #include <libubox/list.h> #include <libubox/avl.h> +#include <libubox/blobmsg.h> + +static inline bool blobmsg_get_bool_default(struct blob_attr *attr, bool val) +{ + if (!attr) + return val; + + return blobmsg_get_bool(attr); +} #define __init __attribute__((constructor)) |