summaryrefslogtreecommitdiff
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2018-01-09 18:42:22 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2018-01-09 18:42:22 +0100
commit72163bd5f3ccefc1edda585f6f605c37e774a0b8 (patch)
tree59df1629a4c0884e2072c8082e9b4d392be648e4 /proto/ospf
parent09c1e370b3084f7acb7c3777427670a69945368a (diff)
Nest: Allow modification of channels inherited from templates
Multiple definitions of same channels are forbidden, but inherited channel can be redefined. In such case channel options are merged.
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/config.Y7
1 files changed, 4 insertions, 3 deletions
diff --git a/proto/ospf/config.Y b/proto/ospf/config.Y
index ce409a3a..005f4381 100644
--- a/proto/ospf/config.Y
+++ b/proto/ospf/config.Y
@@ -84,8 +84,8 @@ ospf_proto_finish(void)
/* Define default channel */
if (EMPTY_LIST(this_proto->channels))
{
- this_proto->net_type = ospf_cfg_is_v2() ? NET_IP4 : NET_IP6;
- channel_config_new(NULL, this_proto->net_type, this_proto);
+ uint net_type = this_proto->net_type = ospf_cfg_is_v2() ? NET_IP4 : NET_IP6;
+ channel_config_new(NULL, net_label[net_type], net_type, this_proto);
}
/* Propagate global instance ID to interfaces */
@@ -238,7 +238,8 @@ ospf_af_mc:
/* We redefine proto_channel to add multicast flag */
ospf_channel_start: net_type ospf_af_mc
{
- $$ = this_channel = channel_config_new(NULL, $1, this_proto);
+ /* TODO: change name for multicast channels */
+ $$ = this_channel = channel_config_get(NULL, net_label[$1], $1, this_proto);
/* Save the multicast flag */
if (this_channel == proto_cf_main_channel(this_proto))