aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Prindeville <philipp@redfish-solutions.com>2020-12-07 13:19:30 -0700
committerHans Dedecker <dedeckeh@gmail.com>2020-12-11 20:53:36 +0100
commit5d2b577a53021372ffe8327a102859124d9dffd2 (patch)
tree423cc1527e1b8a0a57fad1b30e8f06f662294fd6
parent882ca13d923796438fd06badeb00dc95b7eb1467 (diff)
downloadupstream-5d2b577a53021372ffe8327a102859124d9dffd2.tar.gz
upstream-5d2b577a53021372ffe8327a102859124d9dffd2.tar.bz2
upstream-5d2b577a53021372ffe8327a102859124d9dffd2.zip
xfrm: support 'multicast' attribute on interfaces
You shouldn't need the overhead of GRE just to add multicast capability on a point-to-point interface (for instance, you might want to run mDNS over IPsec transport connections, and Avahi requires IFF_MULTICAST be set on interfaces, even point-to-point ones). Borrowed heavily from: b3c9321b9e gre: Support multicast configurable gre interfaces Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
-rw-r--r--package/network/config/xfrm/Makefile2
-rwxr-xr-xpackage/network/config/xfrm/files/xfrm.sh7
2 files changed, 6 insertions, 3 deletions
diff --git a/package/network/config/xfrm/Makefile b/package/network/config/xfrm/Makefile
index 1b3b99adb0..bcee89f82c 100644
--- a/package/network/config/xfrm/Makefile
+++ b/package/network/config/xfrm/Makefile
@@ -2,7 +2,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=xfrm
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/config/xfrm/files/xfrm.sh b/package/network/config/xfrm/files/xfrm.sh
index 1bd1958726..ca7c3380e6 100755
--- a/package/network/config/xfrm/files/xfrm.sh
+++ b/package/network/config/xfrm/files/xfrm.sh
@@ -11,8 +11,8 @@ proto_xfrm_setup() {
local cfg="$1"
local mode="xfrm"
- local tunlink ifid mtu zone
- json_get_vars tunlink ifid mtu zone
+ local tunlink ifid mtu zone multicast
+ json_get_vars tunlink ifid mtu zone multicast
[ -z "$tunlink" ] && {
proto_notify_error "$cfg" NO_TUNLINK
@@ -36,6 +36,8 @@ proto_xfrm_setup() {
json_add_string link "$tunlink"
+ json_add_boolean multicast "${multicast:-1}"
+
json_add_object 'data'
[ -n "$ifid" ] && json_add_int ifid "$ifid"
json_close_object
@@ -61,6 +63,7 @@ proto_xfrm_init_config() {
proto_config_add_string "tunlink"
proto_config_add_string "zone"
proto_config_add_int "ifid"
+ proto_config_add_boolean "multicast"
}