projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bridge: Fix multicast_to_unicast feature by hairpin+isolate
[project/netifd.git]
/
proto.c
diff --git
a/proto.c
b/proto.c
index
3a7b2a8
..
eaec913
100644
(file)
--- a/
proto.c
+++ b/
proto.c
@@
-270,6
+270,7
@@
parse_gateway_option(struct interface *iface, struct blob_attr *attr, bool v6)
route->mask = 0;
route->flags = (v6 ? DEVADDR_INET6 : DEVADDR_INET4);
route->mask = 0;
route->flags = (v6 ? DEVADDR_INET6 : DEVADDR_INET4);
+ route->metric = iface->metric;
unsigned int table = (v6) ? iface->ip6table : iface->ip4table;
if (table) {
unsigned int table = (v6) ? iface->ip6table : iface->ip4table;
if (table) {
@@
-585,16
+586,20
@@
void
proto_attach_interface(struct interface *iface, const char *proto_name)
{
const struct proto_handler *proto = &no_proto;
proto_attach_interface(struct interface *iface, const char *proto_name)
{
const struct proto_handler *proto = &no_proto;
+ const char *error = NULL;
if (proto_name) {
proto = get_proto_handler(proto_name);
if (!proto) {
if (proto_name) {
proto = get_proto_handler(proto_name);
if (!proto) {
-
interface_add_error(iface, "proto", "INVALID_PROTO", NULL, 0)
;
+
error = "INVALID_PROTO"
;
proto = &no_proto;
}
}
iface->proto_handler = proto;
proto = &no_proto;
}
}
iface->proto_handler = proto;
+
+ if (error)
+ interface_add_error(iface, "proto", error, NULL, 0);
}
int
}
int