From 275e90c2834004af73f9d533552b1d15e8acebf7 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 19 Apr 2014 05:46:27 +0200 Subject: [PATCH] netifd: fix proto none crash --- .../0019-netifd-fix-proto-none-crash.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 patches/openwrt/0019-netifd-fix-proto-none-crash.patch diff --git a/patches/openwrt/0019-netifd-fix-proto-none-crash.patch b/patches/openwrt/0019-netifd-fix-proto-none-crash.patch new file mode 100644 index 00000000..2b06d50b --- /dev/null +++ b/patches/openwrt/0019-netifd-fix-proto-none-crash.patch @@ -0,0 +1,35 @@ +From: Matthias Schiffer +Date: Sat, 19 Apr 2014 05:45:51 +0200 +Subject: netifd: fix proto none crash + +diff --git a/package/netifd/patches/002-fix_proto_none_crash.patch b/package/netifd/patches/002-fix_proto_none_crash.patch +new file mode 100644 +index 0000000..8def2a0 +--- /dev/null ++++ b/package/netifd/patches/002-fix_proto_none_crash.patch +@@ -0,0 +1,25 @@ ++--- a/proto.c +++++ b/proto.c ++@@ -503,6 +503,22 @@ static int ++ no_proto_handler(struct interface_proto_state *proto, ++ enum interface_proto_cmd cmd, bool force) ++ { +++ struct interface *iface; +++ struct device *dev; +++ +++ switch (cmd) { +++ case PROTO_CMD_SETUP: +++ iface = proto->iface; +++ dev = iface->main_dev.dev; +++ +++ interface_set_l3_dev(iface, dev); +++ +++ break; +++ case PROTO_CMD_TEARDOWN: +++ case PROTO_CMD_RENEW: +++ break; +++ } +++ ++ return 0; ++ } ++