netifd: fix proto none crash
This commit is contained in:
parent
28d49e9872
commit
275e90c283
35
patches/openwrt/0019-netifd-fix-proto-none-crash.patch
Normal file
35
patches/openwrt/0019-netifd-fix-proto-none-crash.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
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;
|
||||||
|
+ }
|
||||||
|
+
|
Loading…
Reference in New Issue
Block a user