summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
Diffstat (limited to 'proto')
-rw-r--r--proto/ospf/config.Y5
-rw-r--r--proto/radv/config.Y1
-rw-r--r--proto/radv/radv.c2
-rw-r--r--proto/rip/rip.c2
-rw-r--r--proto/rpki/rpki.c2
-rw-r--r--proto/static/static.c2
6 files changed, 7 insertions, 7 deletions
diff --git a/proto/ospf/config.Y b/proto/ospf/config.Y
index fd2cfe8a..4b7d5a36 100644
--- a/proto/ospf/config.Y
+++ b/proto/ospf/config.Y
@@ -85,7 +85,7 @@ ospf_proto_finish(void)
struct ospf_iface_patt *ic;
/* Define default channel */
- if (EMPTY_LIST(this_proto->channels))
+ if (! proto_cf_main_channel(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);
@@ -248,8 +248,7 @@ ospf_channel_start: net_type ospf_af_mc
$$ = 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))
- OSPF_CFG->af_mc = $2;
+ OSPF_CFG->af_mc = $2;
};
ospf_channel: ospf_channel_start channel_opt_list channel_end;
diff --git a/proto/radv/config.Y b/proto/radv/config.Y
index dda9cfcd..8d4a3ab9 100644
--- a/proto/radv/config.Y
+++ b/proto/radv/config.Y
@@ -46,6 +46,7 @@ proto: radv_proto ;
radv_proto_start: proto_start RADV
{
this_proto = proto_config_new(&proto_radv, $1);
+ this_proto->net_type = NET_IP6;
init_list(&RADV_CFG->patt_list);
init_list(&RADV_CFG->pref_list);
diff --git a/proto/radv/radv.c b/proto/radv/radv.c
index b4235917..66e8eb4b 100644
--- a/proto/radv/radv.c
+++ b/proto/radv/radv.c
@@ -564,7 +564,7 @@ radv_postconfig(struct proto_config *CF)
// struct radv_config *cf = (void *) CF;
/* Define default channel */
- if (EMPTY_LIST(CF->channels))
+ if (! proto_cf_main_channel(CF))
channel_config_new(NULL, net_label[NET_IP6], NET_IP6, CF);
}
diff --git a/proto/rip/rip.c b/proto/rip/rip.c
index 8b4719f7..e1a235a0 100644
--- a/proto/rip/rip.c
+++ b/proto/rip/rip.c
@@ -1105,7 +1105,7 @@ rip_postconfig(struct proto_config *CF)
// struct rip_config *cf = (void *) CF;
/* Define default channel */
- if (EMPTY_LIST(CF->channels))
+ if (! proto_cf_main_channel(CF))
channel_config_new(NULL, net_label[CF->net_type], CF->net_type, CF);
}
diff --git a/proto/rpki/rpki.c b/proto/rpki/rpki.c
index 799cb877..ab0837f3 100644
--- a/proto/rpki/rpki.c
+++ b/proto/rpki/rpki.c
@@ -923,7 +923,7 @@ rpki_postconfig(struct proto_config *CF)
{
/* Define default channel */
if (EMPTY_LIST(CF->channels))
- channel_config_new(NULL, net_label[CF->net_type], CF->net_type, CF);
+ cf_error("Channel not specified");
}
static void
diff --git a/proto/static/static.c b/proto/static/static.c
index 661f1aac..2789c1bb 100644
--- a/proto/static/static.c
+++ b/proto/static/static.c
@@ -434,7 +434,7 @@ static_postconfig(struct proto_config *CF)
struct static_config *cf = (void *) CF;
struct static_route *r;
- if (EMPTY_LIST(CF->channels))
+ if (! proto_cf_main_channel(CF))
cf_error("Channel not specified");
struct channel_config *cc = proto_cf_main_channel(CF);